Need some help with solving diff.equ with matlab/simulink

  • Thread starter Thread starter rularn
  • Start date Start date
Click For Summary
SUMMARY

The discussion focuses on solving the differential equation x'[t] + x[t] = a + Sin[b*t] using MATLAB/Simulink, with specific parameters a=1, b=1, and initial condition x(0)=2. The user provides the solution x(t) = 1/2 e^-t (-cos(t) e^t + sin(t) e^t + 2 e^t + 3) and the transfer function G(s) = (a/s + b/(b^2 + s^2))/(s + 1). The main issue raised is the correct application of the initial value in the context of the transfer function, which the user ultimately resolves.

PREREQUISITES
  • Understanding of differential equations, specifically first-order linear equations.
  • Familiarity with MATLAB and Simulink for solving differential equations.
  • Knowledge of Laplace transforms and their application in control systems.
  • Basic understanding of transfer functions and their significance in system analysis.
NEXT STEPS
  • Explore MATLAB's built-in functions for solving differential equations, such as ode45.
  • Learn about the implementation of transfer functions in Simulink.
  • Study the concept of initial conditions in the context of Laplace transforms.
  • Investigate the graphical representation of solutions to differential equations in MATLAB.
USEFUL FOR

Students and professionals in engineering, particularly those studying control systems or using MATLAB for mathematical modeling and simulation of dynamic systems.

rularn
Messages
8
Reaction score
0
Hi!

Homework Statement


I have this x'[t] + x[t] = a + Sin[b*t] diff.equ that I would like to solve with matlab/simulink.
Let set a=1, b=1 and
x(0)=2

Homework Equations


I know that x(t) = 1/2 e^-t (-cos(t) e^t+sin(t) e^t+2 e^t+3) and what it look like (see pic). I aslo got the transfer equ G(s) from Laplace and it should be:

G(s) = (a/s+b/(b^2+s^2))/(s+1),


The Attempt at a Solution



The only thing I don't get right is the initial value as you can see at the pic. It also shows what it should look like. What do I do wrong?

It should be easier to use the transfer equ G(s), but I don't get that right either. Any suggestions?

http://img205.imageshack.us/img205/821/reglerth3.jpg


Thank you!
 
Last edited by a moderator:
Physics news on Phys.org
Ah don't worry guys, I fixed it
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
4K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
Replies
23
Views
6K
  • · Replies 3 ·
Replies
3
Views
1K
  • · Replies 1 ·
Replies
1
Views
2K