Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to integrate MATLAB optimization method for tuning? #15

Open
cnpcshangbo opened this issue Sep 10, 2018 · 1 comment
Open

How to integrate MATLAB optimization method for tuning? #15

cnpcshangbo opened this issue Sep 10, 2018 · 1 comment
Assignees
Labels
discussion discussion, summary and to-do list

Comments

@cnpcshangbo
Copy link
Owner

cnpcshangbo commented Sep 10, 2018

First, we need to figure out what objective function to use for tuning parameters.

There're several options:

  • ITAE
  • Gain and phase margin, Bode loop shaping, flat phase specification
  • ITAE + ITAE (50%gain) + ITAE (150%gain)

What is the function that we want to tune?

  • ITAE
    If we use ITAE as the objective function, we need to make a MATLAB function that can output the ITAE value with inputs of three parameters to be tuned. That means the MATLAB function should be able to call a Simulink model, then fill parameters into the Simulink model, run it and collect the ITAE value.

  • PM (Phase margin)
    If we want to make PM to be minimum, we need to create a MATLAB function that can output the PM. This can be realized by using bode() function in MATLAB. Therefore, PM method is the simplest one which we need to try first.

To-do list:

  • Create objective function;
  • Determine the input value range and output range;
  • Put constrains into optimization script.
@cnpcshangbo cnpcshangbo added the discussion discussion, summary and to-do list label Sep 10, 2018
@cnpcshangbo cnpcshangbo added this to the create objective function milestone Sep 10, 2018
@cnpcshangbo cnpcshangbo self-assigned this Sep 10, 2018
@cnpcshangbo
Copy link
Owner Author

How to build the objective function?

% Calculates derivative at crossover frequency
% Output: derivative at crossover frequency
%
% In: 
% variables:
% lambda, ki and kp
% Fractional order: lambda
% Integrator gain: ki
% Proportional gain: kp
%
% constants: wc, phi
% Crossover frequency: wc
% Phase margin: phi.

Next, we need to figure out the process for calculating the derivative at crossover frequency is in the article. Let's consider the three specifications for flat phase.
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion discussion, summary and to-do list
Projects
None yet
Development

No branches or pull requests

1 participant