5

Optimizing system using Simulink Design Optimization

 3 years ago
source link: https://matlabhelper.com/blog/simulink/optimizing-system-using-simulink-design-optimization/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

.st0{fill:#FFFFFF;}

Optimizing system using Simulink Design Optimization 

 August 8, 2020

By  Edward Rodriguez

Need Urgent Help?

Our experts assist in all MATLAB & Simulink fields with communication options from live sessions to offline work.

testimonials

Philippa E. / PhD Fellow

I STRONGLY recommend MATLAB Helper to EVERYONE interested in doing a successful project & research work! MATLAB Helper has completely surpassed my expectations. Just book their service and forget all your worries.

Yogesh Mangal / Graduate Trainee

MATLAB Helper provide training and internship in MATLAB. It covers many topics of MATLAB. I have received my training from MATLAB Helper with the best experience. It also provide many webinar which is helpful to learning in MATLAB.

Read another post

Introduction

Let's imagine that you want a system to be controlled. Therefore, you go to Simulink, you build the model, you simulate it, you compare the response obtained in simulation with your real measured data, and you see that they do not match, what happened? Are you sure that you have found the correct parameters for your model? No? Don't worry about it, with Simulink Design Optimization it is straight forward to discover this, you will only need actual measured data from your system, and then we will see how to estimate the parameters of your model. Actually, if you want more, we could use the same toolbox to get a proper response from the system according to your requirements.

Simulink Design Optimization is an exciting toolbox since it allows you to use some optimization methods to minimize a cost function. This toolbox is commonly used for dynamical systems, as seen in control systems. It can help you in improving your system response and estimate the parameters of your model. On this blog, the most important features of Simulink Design Optimization will be covered to give you a complete insight. Two important topics which will be discussed here:

  • Parameter estimation
  • Response optimization

First, we will use Parameter estimator app to match the response of a simulated model in Simulink comparing its response with real measured data, we will see that some previous steps will need to be done until estimate the model parameters like do preprocessing data.

Then, for the other approach, we are using the Response optimizer app to get a proper system response for some user-given requirements, there will be different ways to do this, and we will see the main ones.

Note: You must have Simulink Design Optimization Toolbox installed in your MATLAB. To check if it is present, use >>ver in MATLAB Command Window and locate this toolbox.

Simulink Design Optimization for parameter estimation

Simulink design optimization allows us to find some parameters of our model if they are missed or even give us an insight into possible parameter values according to the system's response (measured data). Next, we will introduce the model that we are using for parameter estimation.

Model

In this case, we have chosen a MATLAB built-in model: Engine Throttle model. The throttle system controls the flow of air and fuel mixture to the engine cylinders. There is a butterfly valve that opens when a driver presses the accelerator pedal. Opening this valve and depending on how the valve opens the engine speed will increase or decrease.

As you see, there are two subsystems:

Motor subsystem

Throttle subsystem

Preprocessing data

Comparing real data vs simulated data

Extract Data

Replacing outliers

Filtering data

Estimating parameters

Validating parameters

MH Quiz Contest - Dec'20

Online MCQ Quiz on Machine Learning & MATLAB

Special Prize applicable till 31st December 2020. Hurry up!

Simulink Design Optimization for Response Estimation

Now, we are exploring some approaches that could be used for response estimation.

Using time-domain specifications

We are using a MATLAB built-in model: watertank_stepinput, so you can open or create this model from the command window.

The Water-Tank system is given by:

Where:
  • A= cross-sectional area
  • b= flow rate constant
  • a= flow rate constant
  • H= height of the water in the tank
  • V= voltage applied to the pump

This is a nonlinear model with single-input and single-output (SISO), where the height of the water is the output. We are starting with adding the model parameter values:

Go to the model workspace and add the model values:

Now, there are different forms to specify the time-domain requirement, let's use the most friendly one! We are using Check Step Response Characteristics block, only be sure that this block is connected to the system output.

And add your time-domain requirements:

Now click on Ok and open response optimizer app

Click on plot model response

Black lines show the boundary constraints for time-domain requirements (settling time, rise time, so on) so, when optimization finishes, the model response should accomplish these boundaries.

Now it is time to select the parameters of the controller to obtain the desired response. Select Ki and Kp.

Next step is to click on optimize, and finally, the result is shown:

The final response (blue) met all the requirements, and Kp and Ki values are updated!

Specifying a tracking signal

The optimized response is:

Conclusion

Simulink Design Optimization is an excellent tool if you are looking for how to estimate parameters of a model, you can both estimate and validate the obtained parameters, and this will help you to notice if there is any overfitting or underfitting as well. On the other side, you can use the estimating Parameter not only for your model but also to find your best controllers for any requirements and even if you need to track some user-defined reference.

Loved the Blog? Gives us your valuable feedback through comments!

Thank you for reading this blog. Do share this blog, if you found it helpful. If you have any query, post it in the comments or get in touch with us by emailing your questions to [email protected]. Follow us on LinkedInFacebook and Subscribe to our YouTube Channel. We have expanded the traditional classroom teaching to meet the needs of today's learners. Our experts assist in all MATLAB & Simulink fields with communication options from live sessions to offline work with Pricing suitable for everyone. You can get offline help via email or opt for online zoom meetings with one-click content sharing, real-time co-annotation, and digital whiteboard.

If you are looking for one-time expert help, you can go ahead with Pay As You Go Plan. If your task is research-oriented like thesis support or paper implementation and you have a proper timeline, our recommendation would be Research Assistance, a monthly plan with a steady reduction of 10% of the expert fee up to six months of subscription. We also offer Corporate Assistance for requirements with annual validity. The minimum expert booking time is 1 hour under the Pay As You Go plan. You can book 5/10/20 hours under the Research Assistance plan. You will get expert help for the time you book only after you have an active order.

If you are looking for an expert's help and ready for the paid service, share your requirement with necessary attachments & inform us about any Service preference along with the timeline. Once evaluated, we will revert back to you with more details and the next suggested step.

Education is our future. MATLAB is our feature. Happy MATLABing!

About the author

My Name is Edward Rodriguez, I am 22 years old and I am from Cúcuta, Colombia (not Columbia). I studied Electronics Engineering at the Industrial of Santander University (UIS) in Bucaramanga, Colombia. I like listening to Salsa music and playing soccer in my free time!!!


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK