How can I create discrete transfer functions in Simulink?

Hello,
I have created a control system with PID controller in continuous domain. Now I want to discretise the whole model ( controller + plant ). I brought the controller in the discrete domain first and did multi domain simulation. I got the result, which I required. Now, I want to bring the plant in discrete domain.
My plant is a simple PT-1 element with a delay time of 10 micro seconds.
G(s) = K* e^(-sT_t)/(s+a) , where T_t is the delay time.
I want to ask how can I create this transfer function in Discrete Transfer function block? ( For simplicity it is possible to neglect delay time )
In discrete domain, after neglecting the delay time:
G(z) : k* z / (z - e^-a*T) , T is the sampling time
Thanks in advance.

 Accepted Answer

Hi,
You want to create discrete transfer functions in Simulink for above G(z), right?
You can create it in Simulink using Discrete Transfer Fcn Simulink block.
Kindly check the attached block.
Regards,
Abdulmanan Butt

4 Comments

Hello,
Thanks for your response. However, the discrete transfer fucntion block allows to give co efficients of the form a1*z +/- c .
I created the block exactly how you showed but I get the following error when running the simullation.
Invalid setting in 'Control_loop_DEBUG2_PI_With_PIDBlock_fixdt_2_Plantdiscrete/Plant//Control System/Plant/Discrete Transfer Fcn' for parameter 'Denominator'.
Caused by:
Error evaluating parameter 'Denominator' in 'Control_loop_DEBUG2_PI_With_PIDBlock_fixdt_2_Plantdiscrete/Plant//Control System/Plant/Discrete Transfer Fcn'
Undefined function or variable 'e'.
Try to use "exp" instead of e.
Thats correct. I already realised after posting the first comment that there's no e function. Thanks for the response. It worked. :D

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!