Control System Tuner app works well for this custom controller architecture. The easiest way (at least for me) to create a block diagram specifying this architecture is in Simulink. So: 1. I created a Simulink model shown below:
Instead of using a pure derivative (never a good idea), I used s*N/(s+N) circuit shown in the region highlighted in blue. It basically differentiates the input signal at the lower frequencies, but at the higher frequencies (where you will have a lot of noise in your sensor reading), it adds a first order filter.
I set the gains for PI and Kv to 1,1,1 - default values. The system is unstable with these gains.
2. Now I started Control System Tuner, set PI and KV as blocks to tune, and added a step tracking requirement as shown below:
3. Now press "Tune", and the tool very quickly creates the design meeting requirements. Update block parameters to write the tuned values back to Simulink. Simulate and look at the results:
The model with tuned gains and Control System Tuner session are attached.
HTH. Arkadiy
Best Answer