Questions on the use of Mathematica to analyze, design, and simulate continuous- and discrete-time control systems.

learn more… | top users | synonyms

3
votes
1answer
108 views

Discrepancy between Matlab and Mathematica

What is the difference between how Matlab and Mathematica solve State-Space and Transfer Function models? I have a $16 \times 16$ state space system for which I am calculating transfer function. ...
0
votes
0answers
92 views

Need help with very complex mechanical system of equations

I have three equations as follows: $A_p=F \cos(\alpha+ \phi) - \mu N^{'}_{S_1} - \mu N_{S_1} - W \sin \theta = m ( \ddot x - r \ddot \theta (\sin (\gamma+ \phi)) )$ $B_p=F \cos(\alpha+ \phi) - \mu ...
0
votes
1answer
44 views

Inverse and Series Connection - TransferFunctionModel

I need to perform certain operations on individual transfer functions. As an example, ...
3
votes
1answer
55 views

How to index multi-dimensional vectors in NDSolve/WhenEvent?

I want to solve a system of coupled ODEs using NDSolve with WhenEvent. But I'm having a hard time trying to index the state ...
3
votes
2answers
89 views

Solve transfer function with non-zero initial conditions

Hand computation I have a transfer function defined as $\frac{0.6p+1}{0.6p^2+2.2p+8}$ which was derived from a circuit. Solving this by hand gives the equation, $$i(t)=Ce^{-1.83t}\cos(3.16t + \phi)$$ ...
3
votes
1answer
48 views

Basic computations in frequncy domain

I have been trying to find documentation on performing basic operation with transfer function models but have been unable to do so. By basic operation I mean, e.g. Multiply controller transfer ...
4
votes
1answer
100 views

Issues with modeling pulses in a very simple system of DAEs

Bug introduced in 10.4.1 or earlier Bug has been confirmed by WRI [Case:3594387]: It does appear that the NDSolve function is not behaving properly in this case and an incident report has been ...
20
votes
2answers
440 views

Numerical optimal control

I was hoping to tackle optimal control using Mathematica in order to learn how I can use Mathematica's built in numerical integration and optimization functions together in order to solve an optimal ...
2
votes
0answers
51 views

Mathematica for dynamics and controls [closed]

I am new to Mathematica and want it to use for dynamic and control systems. To begin with, I would want to be limited to symbolic computation for linear and nonlinear control systems - including ...
0
votes
1answer
102 views

Problem with solving an optimal control system with Shooting Method

I try to solve a system of differential equation by shooting method. I looked at questions asked on the site but I could not find that could help me. My functions are ; ...
1
vote
1answer
34 views

NonlinearStateSpaceModel/OutputResponse gives doubled outputs

I want to simulate a pendulum or rather the controlled system. But NonlinearStateSpaceModel or the OutputResponse gives weird ...
9
votes
1answer
76 views

Working Precision in nonlinear control systems

When simulating a nonlinear control system using StateResponse , do the options WorkingPrecision, ...
0
votes
1answer
31 views

Compute StateResponse for list of inputs

How do I find the state response of a system for a list of inputs? Simply writing an array in the place where the input enters as an argument of StateResponse ...
2
votes
0answers
42 views

How to model discontinuities in a NonlinearStateSpaceModel

I know that it is possible to model discontinuities like bouncing and other collisions by using WhenEvent with NDSolve. However, I am using the tools for Non linear systems and I'd like to know if ...
1
vote
1answer
81 views

From non-linear homogeneous DAE to linear state-space form

I have a non-linear homogeneous DAE $x' = F(y)$, $G(y) = 0$ where $x$, $y$ are vectors, $F$ is linear with constant coefficients, and $G$ is a polynomial with parametric coefficients. How can I ...
1
vote
1answer
103 views

How to see controllers response?

How can I get/plot the controller's effort of a controlled system (state space model)? Example system: ...
2
votes
1answer
60 views

How does RootLocusPlot handle TransferFunctionModel

I'd like to analyze the poles (denominator-roots) of a TransferFunctionModel, that was generated from a NonLinearStateSpaceModel....
0
votes
1answer
179 views

TransferFunctionModel and BodePlot shows different result between Mathematica and Matlab

I was doing the TransferFunctionModel and BodePlot. But the result from Mathematica and Matlab are different. The function is as follows: ...
0
votes
2answers
155 views

Convert DE to first order?

I have the following set of second-order differential equations: ...
0
votes
0answers
78 views

solving dynamic system by a finite difference equation approximation

I have a four dimensional dynamical system from optimal control model. I have 2 states and 2 control variables. I have already found the corresponding initial conditions for two control variables for ...
8
votes
1answer
158 views

Problems with StateSpaceModel in v10.2

Bug introduced in 10.0.2 and fixed in 10.3 I don't know if this is a bug, or if just something changed I can't figure out. Take the following examples: ...
0
votes
1answer
95 views
1
vote
3answers
152 views

How do I make a definition/function/method as I would in Java/MATLAB/Python

I've been trying to figure this out for a few hours now and it's driving me nuts. I am trying to confirm that, after transforming a Schrodinger equation, that the new wavefunctions satisfy the new ...
4
votes
2answers
358 views

Evaluation problems with NDSolve using the fixed step ExplicitEuler-Method

Motivation I am using Mathematica to implement System Dynamics (SD) models, e.g. differential equation models as applied to management/economic problems following the "methodology" of Jay W. ...
3
votes
0answers
151 views

System Identification from test data

I've been looking for a way to model a simple SISO system from test data using Mathematica. Something similar to MATLAB's System Identification Toolkit, that estimates a transfer function from the ...
4
votes
1answer
167 views

OutputResponse in V9 vs V10

Bug introduced in 10.0.1 and persisting through 10.2 or later I have same code that works in version 9.0.1, but not in version 10.0.1.0 (according to @Sektor, it works in 10.0.0.0, too). ...
0
votes
0answers
97 views

Selecting values over lists for discrete inputs in NDSolve [duplicate]

I'm currently trying to simulate a step response in a simple tank system with NDSolve. I would like it to start at say time 2 (the precise time is not important). ...
1
vote
1answer
111 views

StateSpaceModel- damped oscillator

I'm new in Control system and in Mathematica too. res1 is the state space as follows ...
1
vote
3answers
268 views

Operations on transfer function model

Suppose I have a transfer function defined via TransferFunctionModel, e.g. tf == TransferFunctionModel[{{1/s}}, s]. How can I ...
2
votes
2answers
71 views

Is StateSpaceModel command ignoring the StateSpaceRealization option?

fixed in 10.0.2 This is version 10.01 on windows. It seems that StateSpaceModel is completely ignoring the StateSpaceRealization option when create a state space object. ...
1
vote
1answer
170 views

Why does LyapunovSolve solve non-standard form?

LyapunovSolve[A,Q] solves the equation $A P + P A^T = Q$ for $P$ whereas the standard form (wikipedia,lecture notes, p.25, linear control systems) of the Lyapunov ...
0
votes
1answer
285 views

Extracting filter coefficients from a transfer function

What is the correct way to extract coefficients (in a form I could use in RecurrenceFilter) from a filter which I have represented as a Mathematica transfer ...
5
votes
1answer
90 views

StateSpaceRealization “ControllableCompanion” does not generate ControllableCompanion form from DE

Fixed in 10.1 I must be doing something wrong, but do not see it. There is an option in Mathematica control system function StateSpaceModel where one asks it to ...
5
votes
0answers
285 views

How to draw block diagrams as Graph objects?

In the documentation ClosedLoopResponsesWithAPIDController, There is a very nice block diagram. I want to create my own block diagrams similar to this. I clicked on the diagram and pressed "command-...
1
vote
1answer
83 views

NonlinearStateSpaceModel: Trying to parse the documentation

I am trying to follow the documentation on NonlinearStateSpaceModel here, and the first basic example throws me for a loop. It says it's defining the nonlinear ...
5
votes
2answers
132 views

ToDiscreteTimeModel fails following video

Following the systems-modeling video here at about 15 min, 20 seconds in, the presenter (Bob Sanhedrick, I think) shows a model for an "Asteroids-game"-like 2D spacecraft. The model is trivial: <...
8
votes
1answer
155 views

On using DiracDelta[t] in OutputResposne in version 10. Different result from version 9

I am baffled by this. I was trying to run same example I had working in version 9.01 and found now I get empty plots. The example is here . Here is a simplified version of the above. The same exact ...
6
votes
3answers
846 views

Laplace: from differential equation to transfer function

First at all, this is trictly related to my own question: How to transform transfer functions into differential equations? How can I transfer my differential equation into a transfer function? For ...
0
votes
1answer
101 views

A problem with “RiccatiSolve::ncsol: Cannot compute a stabilizing solution to the matrix equation ”

I have a SSM ( State Space Model ) and I want to calculate its optimum gains unisng LQOutputRegulatorGains[] command. When I run the code, it solves the equations ...
4
votes
1answer
181 views

Why do NDSolve and OutputResponse not evaluate non-analytic functions numerically?

test = OutputResponse[TransferFunctionModel[1/(1 + s), s], Exp[-(1/t)], {t, 0, 10}] does not evaluate. If Exp[-(1/t)] is ...
4
votes
2answers
699 views

How to transform transfer functions into differential equations?

is there a way with Mathematica to transform transferfunctions (Laplace) into differential equations? Let's say I have the transfer function $\frac{Y(s)}{U(s)}=\text{Kp} \left(\frac{1}{s \text{Tn}}+1\...
4
votes
1answer
112 views

How to apply RootLocusPlot correctly

I have to analyze the complex regions of variable c which is define obtained with InverseLaplace help in the form ...
6
votes
1answer
730 views

Estimate parameters of the state space model

I'm using Mathematica 9 and its Control Systems functionality. I've searched the references extensively but seem not to be able to find any examples of state space model parameters estimation. All ...
1
vote
1answer
751 views

Unit of the frequency axis in BodePlot

I have a simple question: What is the unit of the frequency axis in the BodePlot? I searched the documentation, but only found this: The scaling functions can be specified as ScalingFunctions->{{...
1
vote
0answers
349 views

No response from DSolve

Using optimal control theory, I am trying to find the optimal paths of d and k such that they will maximize profit as given by lc: ...
0
votes
1answer
171 views

How to use NyquistPlot without having a transfer function model?

Could anyone tell me how to use NyquistPlot with a first argument that is not a transfer function model? The expression I'd like to pass to ...
9
votes
1answer
943 views

How to calculate the $H_2$ and $H_\infty$ norms of TransferFunctionModels or StateSpaceModels?

Lets assume we have a system model: ...
3
votes
1answer
838 views

How to increase Maximum number of steps in any other functions except NDSolve?

I want to plot an output response from a state space model. I use StateResponse[] to calculate it and then plot it. When I run my code, I face this message: ...
8
votes
2answers
546 views

Adding noise to nonlinear control system using NDSolve

I have a nonlinear control system ...
2
votes
1answer
4k views

How can I draw an asymptotic bode plot?

When I use Mathematica to draw a bode plot, it always gives the precise version, like this: BodePlot[(10 (s + 3))/(s (s + 2) (s^2 + s + 2))] How can I draw the ...