# Questions tagged [control-systems]

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

220 questions
Filter by
Sorted by
Tagged with
432 views

### Finding a way to skip an iteration in a table

I am creating a project in Wolfram that models oil slicking using Cellular Automata. In my project I have a function called vonNeumann Neighborhood that takes in a radius and a length of a size of a ...
1 vote
40 views

### Limiting State-space Controller

I have a state-space representation of a system with a few inputs and outputs. Further, I've used LQRegulatorGains to (surprise, surprise) construct an LQ regulator controller. This is all well and ...
39 views

### How to plot the input to a state-space closed loop model?

I have a mathematica notebook to build the state-space model of a system from its differential equations, calculate LQR gains and simulate the system response. ...
40 views

### How to use the OutputResponse function with multiple inputs?

I have a state-space model with 2 inputs and 2 outputs. The documentations of mathematica to obtain the output response define the usage as ...
52 views

### How to set reference value a State-Space Model with simulating the reponse?

I have a mathematica notebook to build the state-space model of a system from its differential equations, calculate LQR gains and simulate the system response. ...
33 views

### Problem in visualization of control variable from the NDSolveValue solution

I am trying to solve some optimal control problem with free endpoint and bounded control in the switching environment. First of all, it would be great if someone will check the code and the logic ...
78 views

### How to Paste Complex Transfer Function Equation to Excel [closed]

I am trying to paste this transfer function to Excel, is it possible?
75 views

### How can i derive this using StateSpaceModel?

Please how can I solve this using StateSpaceModel. eqns := {(lp \[Theta]''[t]) + m g Sin [\[Theta][t]] + c \[Theta]'[t] - Sin [\[Theta][t]] y0''[t] == 0};
78 views

### Discontinuous ODE results in NDSolve::ndinid warning, initial condition is not in the range specified by the discrete variable (internal variable)

The equations and code are below. The short version is: I know the error is because NDSolve is doing something in the background to handle the discontinuous ODE. ...
67 views

### Matrix Rank Error

I have a linear State Space model and was trying to tell if it was completely controllable. When I get the matrix with ControllabilityMatrix and then calculate the rank I get an incorrect matrix rank ...
130 views

### Possible Lagrangian: ODE and System of ODE's

For the Lagrangian: ...
1 vote
137 views

### NDSolve with piece-wise function and BVP

How to numerically solve a system of differential equation with boundary conditions and piece wise affine functions ? Consider the following system of differential equations from some optimal control ...
1 vote
56 views

### Phase unwrapping of transfer function model for calculating group delay [duplicate]

Suppose that I have a transfer function model ...
223 views

### Plotting horizontal lines on Bode plot

I have an array of transfer functions and plotted multiple Bode plot. Now I need to add a horizontal line to show where all these Bode plots attain a gain of -8db. I know that previously people ...
237 views

### The nonlinear state-space model of a spherical pendulum cannot be linearized and cannot be controlled?

I am attempting to model and control a spherical pendulum. I have derived the equations as follows: ...
342 views

1 vote
662 views

### BodePlot to calculate the amplitude and phase at a specific frequency

I have transfer function: $W=\frac{1}{s+1}$ tf = TransferFunctionModel[{{1/(s + 1)}}, s] BodePlot[tf, {.01, 100}] It is very simple to construct a Bode diagram, ...
1 vote
96 views

### Asymptotic Output Tracking: Compensator properties

Asymptotic Output Tracking: Code Issues The question is, rather, of a theoretical nature (practical applications can be viewed in the topic at the link). Asymptotic Output Tracking is said to be based ...
67 views

### OutputResponse numerical error?

It shoud approach to 1 and remains at 1, but when time over 20s it deteriorates. Mathematica 12.1 ...
1 vote
74 views

### Multidimensional obstacle avoidance in ODE. Part II

Multidimensional obstacle avoidance in ODE (Visualization) https://math.stackexchange.com/questions/4146255/multidimensional-obstacle-avoidance-in-ode For some time, I studied this question more ...
1 vote
80 views

### Notation parse rule does parse when it acts as a argument

https://reference.wolfram.com/language/Notation/tutorial/NotationSymbolizeAndInfixNotation.html Notation[boxes ⟹ expr] set boxes to be parsed to expr I want a simplified notation for entering a ...
146 views

### Multidimensional obstacle avoidance in ODE (Visualization)

A simple 3-dimensional ODE system is given: $F=\begin{cases} \dot{x}=g+g_{U_{rep}} \\ \dot{g}=-g+\frac{df}{dx} \\ \dot{h}=-h+\frac{d^2f}{d^2x} \end{cases}$ Task: Make the variable $g$ move so that ...
1 vote
274 views

96 views

### Affine state-space: Nonlinear output

I am using a system of equations to experiment: $\begin{cases} x_1'=x_2 \\ x_2'=x_1^2-x_2+u \end{cases}$ As an output, I want to use the following non-linear output: $y=e^{-x_1^2}$ ...
186 views

### Asymptotic Output Tracking: Code Issues

My question is a continuation of the topic Which way of solving from nonlinear control to choose?, and in the future I plan to expand this question. I want to try to apply this article https://www....
1 vote
38 views

### Which way of solving from nonlinear control to choose?

I have a nonlinear system: \begin{cases} x'=f(x)+u \\ y=f(x) \end{cases} where $f(x)$ - gradient of some one-extremal function (for example $f=e^{-(x)^2}$), i.e. $\frac{df}{dx}$. I want to construct a ...
270 views

### NDSolve Error - There are fewer dependent variables, than equations, so the system is overdetermined

I have a program in which I am simulating the motion of two-wheel vehicle. I have four global parameters xo (position x of rear wheel), yo (position y of rear wheel), teta (the angle of inclination of ...
122 views

### How to code a Sum Block when working with Transfer Functions?

I am working using transfer functions models with Mathematica and i am missing a basic feature like the ability to use a Sum Block. How could the model above be modeled? Considering: ...
1 vote
87 views

### Do Loop contained in a function defined within a custom package doesn’t work as expected but works fine when function is defined directly in a script

Below is my code and I am having problems running the StdMPC function that I am trying to define. Running my code gives me the error that the matrix A and Xopt[[i]] are not of compatible shapes for ...
102 views

### How to solve this linear complementarity problem with NDSolve or other functions? The arguments should be ordered consistently

I want to find a numerical solution of $\omega(t,q)$, where $t\in[0,T]$ and $q\in[0,N]$. $q_t$ is a determinstic w.r.t $t$, other unmentioned parameters can be fullfilled or given by the user. I met ...
1 vote