Representing controller in z-domain and plant in continuous domain

Background: For a particular plant transfer function (dc-dc converter), I have calculated the transfer function of my controller based on my desired poles and zero locations. I plan to build the entire system on hardware and intend to use a microcontroller to implement the controller. For this reason, I want to simulate continuous-domain plant function in close loop with a discrete-domain controller transfer function.
Question: On Simulink (or MATLAB), please advise about how can I be able to cascade my plant transfer function (which is in s-domain) with the controller transfer function (which is in z-domain in the form of a difference equation). Eventually I want to see the step response of the closed loop system. I built a program in Simulink but eventually the presence of both continuous and z-domain transfer function pops up an error. How can I achieve this? Any other solution (outside Simulink) are also welcome.

답변 (1개)

Arkadiy Turevskiy
Arkadiy Turevskiy 2015년 8월 25일

1 개 추천

Simulink model should not be creating any errors if you are combining continuous and discrete blocks. Here is a model with a simple continuous-time transfer function and discrete-time PID Controller. It simulates fine, no errors.

댓글 수: 1

Hi Arkadiy, Thank you for our quick response. Looking at your file it seems I am lacking the correct settings. Please have a look at my attached simulink file. You would need to run the MATLAB file first (to populate the Workspace) before running the Simulink file.
When I run the file, I see the error "The 'VariableStepDiscrete' solver cannot be used to simulate block diagram 'DifferenceEqnSim' because it contains continuous states". I tried with 'Fixed Step' setting too but it doesnt help. Further, I am unable to find any settings to assign Integrator and/or Filter Method to 'Forward Euler'.
Please advise.

댓글을 달려면 로그인하십시오.

카테고리

질문:

2015년 8월 25일

댓글:

2015년 8월 26일

Community Treasure Hunt

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

Start Hunting!

Translated by