Questions tagged [matlab]

MATLAB is a commercial numerical computer algebra system

MATLAB is a commercial numerical computer algebra system developed by MathWorks, Inc. It is also a programming language. The core is focused on matrix algebra, but extensions (so called "packages", e.g. Simulink) add functionality. This tag should be used to mark questions regarding the use of MATLAB in an electronics and systems theory context, not the general usage itself.

571 questions
16
votes
7 answers

How to do circuit analysis using Matlab?

I often hear of people using Matlab for circuit analysis, but I never actually figured out how it is done. I assume that there is something more to it than just setting up equations by hand and solving them in Matlab. I'm looking for a good starting…
AndrejaKo
  • 23,261
  • 25
  • 110
  • 186
7
votes
2 answers

MATLAB toolbox equivalent for embedded system

We have to develop control software to run in an embedded system. The prototype is made in Matlab (using neural network toolbox), and we want to port the software to C or C++. Do you know which libraries or software we could use to do this? Embedded…
joanlofe
  • 171
  • 3
7
votes
5 answers

Sine generator - Bubba Oscillator

I am trying to simulate a Bubba Ocsillator on MATLAB, Simulink . The problem is that i am not able to generate the sinusoidal from the circuit. This below is my circuit : And this below is my result(Simulated for 10sec) : Zoomed result(Simulated…
Dravidian
  • 211
  • 2
  • 7
7
votes
1 answer

How to go from Matlab to Filter?

I design a filter in Matlab using these command: Fs = 2.5*10^10; n = 2; Wn = 5000/Fs; [b,a] = butter(n,Wn); and get b={9.86988268891764e-14, 1.97397653778353e-13, 9.86988268891764e-14} a={1, -1.99999911142341, 0.999999111423807} How do I make the…
Ramu
  • 71
  • 2
6
votes
1 answer

How to deal with optimal power flow problem in MATLAB?

I am writing an optimal power flow (OPF) program. OPF is an optimization problem in which some decision variables like Generation, Load dispatch are adjusted in power flow program so as to minimize the objective function (usually cost of…
Masan
  • 163
  • 1
  • 5
5
votes
1 answer

Kalman filter on linear acceleration for distance

In my application to calculate displacement from motion of accelerometer, I am using kalman filter to improve the displacement accuracy. Please note I am aware of ineffectiveness of acceleration for displacement in real scenario but in my case…
mohit
  • 153
  • 1
  • 5
5
votes
2 answers

MATLAB to VHDL conversion

How to convert any MATLAB code(.m file) to VHDL(.hdl code). As i have to use my image processing code in a FPGA kit. Any solution? Possible method: Using hdl coder in simulink, converting the original code into an embedded matlab code. Areas of…
Saurav
  • 51
  • 1
  • 3
5
votes
1 answer

Need help with simulation of three-phase rectifier with hysteresis controller

I am attempting to design a closed loop three-phase rectifier with hysteresis control using MATLAB simulink. The outer loop compares output DC voltage with reference voltage, given to a PI controller and the output of the PI controller is multiplied…
5
votes
3 answers

Help finding transfer function for root locus using Matlab

I'd like to pick \$k_d\$ using root locus method, but have problems deriving the necessary transfer function of the system presented below. Assume \$k_p\$ is fixed. The question originates from Randal Beard's paper: "Quadrotor dynamics and control",…
mmm
  • 247
  • 1
  • 7
5
votes
1 answer

How to use Voltage Measurement in Matlab Simulink?

I am a beginner in MatLab Simulink and would like to measure the voltage across two electical nodes. I use Voltage Measurement to perform this task. However, i can not connect the positive and negative terminals of the Voltage Measurement to the…
Giray Salgır
  • 115
  • 1
  • 1
  • 9
4
votes
1 answer

How can I high pass (DSP) filter a low frequency signal without introducing lag?

I need to high pass filter a signal, and my design just isn't cutting it. The part that's making it tricky is that I can't tolerate lag. I am sampling at 20Hz, the signal I care about is 1/12 to 1/4Hz, and my system has to be as real time as…
Bob
  • 848
  • 2
  • 9
  • 21
4
votes
4 answers

Why do MATLAB and LTspice give me different results for a band-pass filter?

Here is the circuit diagram. R = 1 kΩ; C = 10 µF; L = 5 mH. $$H(j \omega) = \frac{R} {\frac{1}{j \omega C} + j \omega L + R}$$ Amplitude Phase The above is what I get from MATLAB, using the code below: syms C w f R = 1000; % Capacitor…
kile
  • 273
  • 8
4
votes
1 answer

FFT of time-compressed signal not outputting correct amplitude spectrum

Given a signal g(t) <--> G(f), a time-compression g(at) <--> 1/(abs(a)) * G(f/abs(a)), but not with the FFT as I've found out. Performing the FFT on g(a*t) doesn't scale the amplitude of the G(f/abs(a)) spectrum at all. What…
user50420
  • 81
  • 6
4
votes
4 answers

How to pick correct filter for a given signal processing task?

I did a study on digital signal processing and I found many theories. But I don't know how to figure out which filter to use when I get a practical signal processing task. Is there a procedure for how to pick the right signal processing…
komto909
  • 332
  • 2
  • 16
4
votes
3 answers

Calculating SNR for ADC samples

I have collected some samples for a 200Hz sine wave using an AVR microcontroller. I would like to quantify the performance of the ADC using the signal to noise ratio measurement. Theoretically, for an ideal ADC it should be SNR = 6.02N + 1.76 (dB).…
Vanvan
  • 59
  • 1
  • 4
1
2 3
38 39