circuitcellar.com
Magazine Support   Digital Library   Products & Services   Suppliers Directory 
 
 





 

Issue 110, September 1999
Internet Control


by Jacob Apkarian

Start Model DerivationLinearizationControl-System DesignSimulation CodingConfigurations Implementation Tuning and Results Ready for Takeoff Software and Sources Equations PDF

TUNING AND RESULTS

My system is implemented as described in the third configuration. The server is located in the engineer’s office, and the client computer and helicopter are in the laboratory, one floor above.

Note that the operator of the server can’t even see the helicopter while running the controller. He has to rely solely on the server’s real-time plotting capabilities to monitor the system’s performance.

I augmented the block diagram to include the simulation of the system here. Therefore, I needed to generate code that runs in real time and performs two tasks—running the system and simulating it at the same time.

Using this technique, I can simultaneously monitor the simulation and the actual response, which is not usually done because it consumes processor power. However, I’m sampling only at 100 Hz, and the computations required for the simulation won’t lengthen the computation time significantly.

Figure 6a shows the results. The simulation and actual results match quite closely, indicating that the linear model is a good representation of the system under these conditions.

a)9903021fig8.gif (7709 bytes)
b)9903021fig9.gif (8410 bytes)

Figure 6a—This graph shows the results with the pitch limit set to 15° and the travel rate limit set to 15°/s. The top plot is desired (blue), actual (red), and simulated (green) elevation. The second graph is actual pitch in degrees. The third graph is desired (blue), actual (red), and simulated (green) travel. Note how close the actual and simulation results are. b—This graph shows the results with pitch limit set to 45° and travel rate limit set to 100°/s. The top plot is desired (blue), actual (red), and simulated (green) elevation. The second graph is actual pitch in degrees, and the third graph is desired (blue), actual (red), and simulated (green) travel.

But note that the pitch command is limited to 15° and that I limited the travel rate command to 15°/s, operating close to the linear region. What happens if you let the helicopter pitch to 45° and tell the system to travel at 100°/s?

This question is easily answered by changing the associated parameters in the relevant block and running the simulation and real-time controller again. The results are shown in Figure 6b. Note that although the simulation and the actual system match relatively closely this time, they diverge when the helicopter pitches to 45°.

They diverge because the simulation doesn’t take into account the fact that a pitch reduces the effective vertical thrust. This behavior shows that care must be taken when simulating complex systems with nonlinearities.

Real-time tuning can be performed by changing the values right off the diagram or by implementing a WinCon control panel. This panel enables you to associate controller parameters with sliders, knobs, or switches and gives you access to these parameters independent of the Simulink diagram.