33
votes
Can we use Mathematica for electronics design?
An example of electronics design is the design of amplifiers using operation amplifiers (op amps). One common configuration is the inverting amplifier depicted below in a schematic entered in LTSpice (...
26
votes
Can we use Mathematica to design an electronic active filter?
Here I would like to share with this great community by offering an example of active filter design.
Introduction
This Mathematica code determines the component values for a low-pass active filter ...
18
votes
Accepted
Mathematica and MATLAB giving different results from inverse Laplace transform
You missed one term in Matlab. den=[1,4,2,3,0]; and not den=[1,4,2,3]; The order is important in Matlab. Since you do not have ...
16
votes
Solving optimal control problem when input is constrained
Semi-smooth Newton solver
This is supposed to solve constrained optimization problems of the form
$$ \text{Minimize } F(x) \text{ subject to } \varPhi(x) = 0 \text{ and } \varPsi(x) \leq 0.$$
More ...
14
votes
Accepted
Numerical optimal control
Oh boy, what a question! This is very similar to some stuff I played a few weeks ago (Kerbal, what a game!). What follows solves (I think) the question you are asking.
An approach that seemed to to ...
13
votes
Accepted
Estimation of parameters of limit cycles for systems of high-order differential equations (n> = 3)
These aren't actual limit cycles and what you're looking for has a fuzzy definition (notice how the amplitude increases in each pass). However this is still fun to play with, so let's see what we can ...
12
votes
Accepted
Why does NonlinearStateSpaceModel linearise?
Consider a model where the nonlinearity is in $x'(t)$ and not in the highest derivative $x''(t)$.
eq1 = {x''[t] + Sin[ x'[t]] + x[t] == u[t]};
Choose the first ...
12
votes
Accepted
Problem with optimal control and Pontryagin's maximum principle
Pontryagin's minimum principle means that we have to use Euler-Lagrange equations. Therefore code looks like this
...
10
votes
Numerical optimal control
This is more of a long comment, hopefully you can find some of these ideas helpful because I don't know how to completely implement this. Therefore, I'd really appreciate comments from more ...
10
votes
Accepted
How is this StateSpaceModel derived?
The standard method depends on what is called state space realization. Which
involves determining $A,B,C,D$ from the transfer function of the ODE.
The standard form of state space representation is
...
10
votes
Accepted
Solving an optimal control problem (LQR)
my solution
A={{-1,0.5},{0.3,-1}}; B={{1},{1}};
x0={{1},{0}}; xT={{0},{1}};
You have to choose an end time
T=10;
Next you ...
10
votes
Why does NonlinearStateSpaceModel linearise?
My guess is to be able to have the same internal representations as for linear systems. It is not possible to represent a system using A,B,C,D state space standard ...
10
votes
Accepted
Frequency Response
In Mathematica, you can work with the function h(z) directly, since Mathematica is symbolic based. In other words, while in Matlab one needs to work for numerical ...
9
votes
Accepted
Discrepancy between Matlab and Mathematica
Using Mathematica 10.4.1 (Windows 7) the following code finds a pretty good match with the Matlab results. (And I'd argue that any differences between the two are due to differences in how the ...
9
votes
Accepted
9
votes
Mathematica and MATLAB giving different results from inverse Laplace transform
With Mathematica you can also do the following
...
8
votes
Accepted
How to index multi-dimensional vectors in NDSolve/WhenEvent?
You need to construct an event for each i from 1 to n:
...
8
votes
8
votes
Accepted
How to implement a Kalman or LQG regulator in the control of classical pendulum problem
The system sysC needs to be modified as
...
8
votes
Converting a backward/forward sweep code for optimal control to _Mathematica_
According to chapter 9, "Mathematica’s NDSolve can take in boundary conditions, and system (9.26) can be directly input into it" (p. 239). Let's give it a try.
...
8
votes
Accepted
What does BodePlot actually calculate?
Your understanding of what BodePlot (with the default ScalingFunctions->{Automatic,"dB"}) computes is correct.
...
7
votes
Accepted
DC gain of a transfer function
The k in zpk is not the same as the dc gain. Given transfer function $\frac{num(s)}{den(s)}$, we write the tf in the form $k\frac{(s-z_1)(s-z_2)\dots}{(s-p₁)(s-p₂)\dots}$ where $z_{i}$ are the zeros ...
7
votes
Accepted
Simulating a combination of PDEs and ODEs
This problem can be solved with the help of pdetoode.
We first eliminate Ib0 and Ib1 from ...
6
votes
Accepted
Problem with solving an optimal control system with Shooting Method
In general, when FindRoot is initialized with two initial guesses for each variable, it uses them to estimate how the function to be solved varies locally with ...
6
votes
Accepted
Do we need to know the input signal when we use KalmanEstimator?
The short answer is yes, we need to know the input signal when using the Kalman filter.
Let's consider an example. Let's say we have a robot and we want to estimate it's position as it drives around ...
6
votes
Accepted
6
votes
Accepted
Mathematica returns 1 for the denominator when clearly it isn't equal to 1
Things work much better if you use vectors instead of row/column matrices. Using LinearSolve[] and Chop[] in this case also ...
6
votes
Accepted
Analyze stability of equilibria using Routh-Hurwitz conditions
There are "modified Routh-Hurwitz criteria" that work directly on the Jacobian matrix that I prefer and don't seem very well known (Fuller 1968). Here's a function I wrote that uses them for up to ...
6
votes
Mathematica and MATLAB giving different results from inverse Laplace transform
With Mathematica, I get significantly different results than your Mathematica results. I do not have access to matlab nor know whether the matlab code shown is correct.
...
6
votes
Accepted
Understanding code generated by MicrocontrollerEmbedCode
The value 84.38063590995105=-26.8592*π is a residue that pops up if the equilibrium value is not set correctly.
There are a few things that need to be changed to ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
control-systems × 220differential-equations × 74
plotting × 37
nonlinear × 32
equation-solving × 21
dynamic × 15
matrix × 12
modeling × 11
signal-processing × 9
linear-algebra × 8
mathematical-optimization × 7
functions × 6
numerical-integration × 6
simulation × 6
bugs × 5
asymptotics × 5
calculus-and-analysis × 4
function-construction × 4
filtering × 4
integral-transforms × 4
matlab × 4
mechanism × 4
process-control × 4
list-manipulation × 3
event-detection × 3