How to add unmodeled delay dynamics at some input - append function problem

Hello world,
I came across the "Control of a Spring-Mass-Damper System Using Mixed mu-Synthesis" I found here.
First of all I don't quite understand what the "append" function does in that context - I already checked the Matlab documentation but I still don't understand what it does here - and then I don't understand why I get an error with my code.
Again, I have a MSD system - 6 inputs and 4 outputs - and I wuold like to add the unmodeled delay dynamics to the 5th and 6th input but I got the error that "Model I/O dimensions must agree (Line 80)" (Line 80 refers to append function).
Basically, I'm performing an analysis which is really close to that of the link.
plant=ss(A,B,C,D);
plant.StateName={'x1';'x2';'x3';'x1dot';'x2dot';'x3dot'};
plant.OutputName={'zpx';'zpu';'y1';'y2'};
Delta=ultidyn('Delta',[1 1]);
Wtau=2.1*tf([1 0],[1 40]);
plant=plant * append(1+Delta*Wtau,5);
plant.InputName={'d1';'d2';'theta1';'theta2';'u1';'u2'};

6 Comments

Is the error coming from the append() or is it coming from * operation between plant and the result of append() ?
append(1+Delta*Wtau,5) results in a model with 2 inputs and 2 output. You indicate that plant is 6 inputs and 4 outputs. It does not make sense to * when nothing at all matches about the number of inputs or outputs.
The error was related to the append function but yes, your comment is on point; it's doesn't make sense to * a 4x6 object with a 2x2 one.
I tried to add zeros - append(0,0,0,0,1+Delta*Wtau,5) - but I don't really understand what I'm doing with respect to the context I'm in.
I read its documentation, but there was nothing related to what I think it's system's dynamic extension.
In other words, I don't have a clue of what it does.
If you want to add a 5th and 6th output, perhaps instead of plant*append(A,B) you should use append(plant, A, B) ?
Yeah, it makes sense but I want to add a delay on two particular inputs, the fifth and the sixth
Question: do you want to delay inputs 5 and 6 for all computations with plant, or do you want to "tap" those inputs and use them delayed for something and also use them undelayed with plant ?
You cannot get at inputs 5 and 6 of plant by right multiplying plant by anything -- not unless those inputs are already flowing as outputs to plant. Right multiplying has the effect of taking the outputs of plant and doing something with them, so if the outputs of plant do not include the signals you want, then you cannot get at them by doing a right-multiply.
You might think for a moment that you could left-multiply to have the effect of cloning signals 5 and 6 of inputs,
1 0 0 0 0 0
0 1 0 0 0 0
0 0 1 0 0 0
0 0 0 1 0 0
0 0 0 0 1 0
0 0 0 0 0 1
0 0 0 0 1 0 %clone input 5
0 0 0 0 0 1 %clone input 6
but if you do that then you end up with a 1 x 8 signal block and that is not suitable for right-multiplying with something that expects 6 inputs.
You might possibly end up needing to use vertcat() or horzcat(). (I do not have much experience with ss models -- not that I have all that much experience with tf, but I have more experience with tf than ss)

Sign in to comment.

Answers (0)

Asked:

on 28 Jul 2019

Commented:

on 8 Aug 2019

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!