We had a meeting with the code open in ZOOM. Here are some points we discussed:
- The code requires another file ground.m. It is attached here.
- The phase of the bode plots were not wrapped. This can be fixed by applying the "PhaseWrapping" options as
opts=bodeoptions('cstprefs');
opts.PhaseWrapping = 'on';
bode(A,opts)
- We evaluated the open-loop transfer function of the system. For this purpose, we added the monitor point ('F') at the actuator and cut the loop there like:
sys = connect(P, S, W, ADC, Winv, A2, DWinv, Dinv, DAC, DW, D, R, C, {'xg' 'nADC', 'nDAC', 'nd', 'nth'}, 'xt', {'F','VDAC'});
OLTF=getLoopTransfer(sys(1),'F');
figure(2)
clf
bode(OLTF,opts);
- We played with the loopgain (Ga2). When Ga2 is a positive number, the loop was stable. We had to shift the low pass cut-off frequency from 10Hz to 12Hz to make the damping of the 2nd peak stable.
|