Clear Filters
Clear Filters

Hi ; i try to implement a matlab example in the link http://www​.mathworks​.com/help/​robust/gs/​active-sus​pension-co​ntrol-desi​gn.html but i got a message error. so kindly can any one explain why i got this error since i just implement the publishe code

2 views (last 30 days)
mb = 300; % kg
mw = 60; % kg
bs = 1000; % N/m/s
ks = 16000 ; % N/m
kt = 190000; % N/m
A = [ 0 1 0 0; ...
[-ks -bs ks bs]/mb ; ...
0 0 0 1; ...
[ks bs -ks-kt -bs]/mw];
B = [0 0; 0 10000/mb ; 0 0; [kt -10000]/mw];
C = [1 0 0 0; 1 0 -1 0; A(2,:)];
D = [0 0; 0 0; B(2,:)];
qcar = ss(A,B,C,D);
ActNom = tf(1,[1/60 1]);
Wunc = makeweight(0.40,15,3);
unc = ultidyn('unc',[1 1],'SampleStateDimension',5);
Act = ActNom*(1 + Wunc*unc);
Act.InputName = 'u';
Act.OutputName = 'fs';
bodeplot(Act,'b',Act.NominalValue,'r+',logspace(-1,3,120))
title('Nominal and 20 random actuator models')
??? Error using ==> gsref.set at 36
Property SampleStateDimension is not gettable.
Error in ==> gsref.set at 36
error(['Property ' varargin{2*i-1} ' is
not gettable.']);
Error in ==> ultidyn.ultidyn at 81
out = set(out,varargin{2*(ii-1)+1},varargin{2*ii});
Error in ==> Untitled at 18
unc = ultidyn('unc',[1 1],'SampleStateDimension',5);

Answers (1)

Walter Roberson
Walter Roberson on 6 Mar 2016
The link you provided no longer exists in R2016a . The replacement appears to be http://www.mathworks.com/help/releases/R2016a/robust/examples/robust-control-of-an-active-suspension.html
I note that the R2016a documentation for ultidyn gives the property name as SampleSpaceDimension, the same as the code you posted, but that the current version of the example uses 'SampleStateDim' .
I suggest you try with the code posted in the R2016a example -- though if that fails then it might be a bug in the version you have that hypothetically might have been fixed by R2016a.
  2 Comments
Muna Shehan
Muna Shehan on 6 Mar 2016
Thanks for your response. The version i used is 2011a, so how i can fit the code posted with my current version (2011a).
Walter Roberson
Walter Roberson on 6 Mar 2016
It turns out that 'SampleSpaceDimension' was a change as of R2015b, and that previous to that it was 'SampleStateDim', so change to that in your code and you might be able to get further.

Sign in to comment.

Categories

Find more on Multicore Processor Targets in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!