This m-file first creates a linear state-space model of a real experimental motion control platform where two electrical motors are used to rotate a payload around a single (vertical) axis. This simple device was built to analyze control schemes for inertial stabilization platforms. More details can be found in the paper
M. Rezac and Z. Hurak. Structured MIMO H∞ Design for Dual-Stage Inertial Stabilization: Case Study for HIFOO and Hinfstruct Solvers. Mechatronics, Elsevier, Vol.23, Iss.8, December, 2013, pp: 1084–1093. DOI: http://dx.doi.org/10.1016/j.mechatronics.2013.08.003.
A rigid plate freely rotatable around a vertical axis carries a standard DC brush-type rotary motor, which via a belt transmission drives the secondary stage carrying a DC voice-coil motor, which pushes the payload. The voice-coil motor enjoys a very small friction, which is a very plausible property for inertial stabilization, but its angular stroke is limited to (+-5 deg). Therefore, the (geared) DC brush-type rotary motor is used to keep the angular devitation close to zero (this is called mid-range control in the industrial process control domain). The key disturbance is the angular velocity of the freely rotatable plate upon which the stator of the DC brushed motor resides. This mimicks the unwanted angular motion of a mobile carrier (car, aircraft, ship). The video at http://youtu.be/F5N3WkDDRZM can help understand the principle.
Having two measured outputs and two control inputs, the control design can either be accomplished by successively closing SISO loops or designing a MIMO controller. The latter generally cannot include some resctrictions on the structure and the order of the controller. With two solvers HIFOO and Hinstruct, both providing identical functionality and comparable performance, the task of structured MIMO control design can be accomplished by minimizing the H-infinity norm of properly defined generalized plant. This is the major part of this m-file. As a side product of this code, a direct comparison of the two solvers can be done.
merci bcp bcp
Note that currently (as of July 27, 2013) there is an issue (a bug) with HIFOO in the latest version 3.5. It is activated when the user tries to input both a constraint on the structure of the controller by using a mask and an initial controller. The check if the initial controller meets the structure
requirements can actually never pass, since the init.a matrix is at first converted to a vector and then compared to a matrix mask. In other words, an n x n matrix is compared to the n^2 vector. The checking routine is be found at lines 132, 133 and 134 of the "processInitialController.m" file. See the following copy of the code. When these three lines are commented out, the hifoo code works again, but the check is not performed.
% check if the initial controller is the same order as the
% if (sum(size(A) ~= size(init.a)) > 0)
% error('The given initial controller doesn''t have the same
order as the given structure');
Text of the error message:
HIFOO Version 3.5, using options
hifoo: "plant" is an SS object, using input partitioning in "InputGroup"
hifoo: "plant" is an SS object, using output partitioning in "OutputGroup"
Error using processInitialController (line 133)
The given initial controller doesn't have the same order as the given
Error in hifoo (line 351)
[init,ssinputcont] = processInitialController(init,pars,options);
Error in dual_stage_realmotors_differentstruct_coupled (line 73)
[K1_hifo, F, VIOL, LOC] = hifoo(P,ordR2+ordK1+ordF,OPTIONS,INIT);
The bug has been reported to the HIFOO developers and the correction is expected soon. Till then, just comment out the three lines.
Updated citation details of the paper.
Updated the link to the paper on a journal webpage (article in press).
Minor polishing of the code.
Win cash prizes and have your live script featured on our websiteLearn more
Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.