Embedded Control System Design
Step 1: Development and non real-time simulation:
The embedded control system software (“the control logic”) is developed by using graphical software tool, such as Matlab, Simulink and Stateflow, simulated and analyzed on a non-real time computer environment. The “plant model”, which is the computer model of the machine to be controlled, is a non-real time detailed dynamic model. Simulations and analysis are done in this non-real time environment.
Step 2: Hardware in the loop (HIL) real-time simulation and testing:
The same control code developed in Step 1 (with minor I/O driver modification) is auto-code generated to C-language and tested on a target embedded control module (ECM) in real-time. The ECM interacts with another real-time simulation computer which simulates the machine behavior. The simulated plant model in the hardware-in-the loop (HIL) computer must be simple enough to run in real-time, yet accurate enough to provide useful information. The engineering challenge in the HIL simulation and testing is finding the proper balance between “plant model” detail for accuracy and simplicity for ability to run in real-time.
Step 3: Testing and validation on actual machine:
The electronic control module(ECM) with the production intent control software is tested (including debugging, tuning, performance testing and validation) on prototype machine under normal operating conditions.
Hardware: Control system ECM and I/Os
This example shows the ECM and I/O hardware for a hydrostatic drive for a dozer. For each track, there is a variable displacement pump and motor pair, both of which are proportionally controlled by EH valves. There are speed sensors from engine and each tracks. Operator commands the forward speed and direction via a two degrees of freedom joystick.
Software: Control system ECM and I/Os
Embedded control software for the tracks are developed using Matlab/Simulink, plus S-functions written in C. In addition to using track speed sensors for closed loop track motion control. In order to avoid engine stalling when dozer hits a pile of load, the algorithm uses engine speed sensor and pressure sensors to dynamically de-stroke hydrostatic drive pumps to reduce the load on engine. The real time code is automatically generated from Simulink for the target ECM.