Hot answers tagged

10 votes

Sine generator - Bubba Oscillator

It does oscillate, you can see that it does on the right side of the plot. If you zoom in on the left side you should also see the oscillation but at a much smaller amplitude. Your misconception ...
Bimpelrekkie's user avatar
  • 80.2k
8 votes
Accepted

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

Have a think about this extract from your LTSpice bode plot and the words I added to it: - And, if I used my simulator of choice (micro-cap) and told it to use 1 million points when calculating the ...
Andy aka's user avatar
  • 437k
7 votes
Accepted

How to use Voltage Measurement in Matlab Simulink?

Your model is not built in simpowersystem environment so you can not use the voltage measurement block. The correct way to measure the voltage, is by using "voltage sensor" from Simscape>foundation ...
Hazem's user avatar
  • 1,084
7 votes
Accepted

Perfect component on LTspice

LTspice solves nonlinear differential equations numerically. It's not an AI system that can figure out intelligently whether a diode is conducting or not, and thus solve your homework questions or ...
Spehro Pefhany's user avatar
7 votes

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

You're seeing a few types of numerical issues: quantization of the frequency sample points, interpolation between those points, as well as rounding in the plot display. I built your circuit in the ...
compumike's user avatar
  • 3,654
6 votes
Accepted

How to calculate poles of overdamped, 2nd order system if only given experimental data?

Write the TF as \$ \small G(s)=\large\frac{ab}{(s+a)(s+b)}\$, where \$a\$ and \$b\$ are real and distinct. This factorises to: \$\small G(s)=\large\frac{ab}{(b-a)} \large(\frac{1}{s+a}-\frac{1}{s+b}\...
Chu's user avatar
  • 7,505
6 votes
Accepted

How can a transfer function with only real poles show an overshoot in the step response?

There is no problem here at all. The measured step response is in perfect agreement with the simulation. It's just tricks of scaling and windowing that is making it appear that anything is amiss. ...
metacollin's user avatar
6 votes
Accepted

In a Delta-Sigma ADC, does noise shaping bring the noise to the signal's frequency?

The mistake you are making is not seeing that there is a time delay lag in the digital signal - this causes you to believe that the noise is mainly related to the input signal - try aligning the ...
Andy aka's user avatar
  • 437k
5 votes
Accepted

Why my low pass digital filter amplifies in the passband?

I found the mistake in my code: when the Matlab's Filter Design & Analisys Tool generates the cofficients, there are even the Gains for the every biquad section. Before the value goes out from ...
thoraz's user avatar
  • 399
5 votes

Sine generator - Bubba Oscillator

Just to add yet another post on this. Here's a circuit that should actually work, using a quad LT1631 and a single power supply rail: simulate this circuit – Schematic created using CircuitLab ...
jonk's user avatar
  • 77.2k
5 votes
Accepted

Why am I getting non-sinusoidal output for sinusoidal input in a mass-spring system?

There's a double integrator in the TF that inverse transforms to a ramp, which is what you're seeing added to the sinusoidal response to the sinusoidal input.
Chu's user avatar
  • 7,505
5 votes
Accepted

FFT of time-compressed signal not outputting correct amplitude spectrum

You have 4 times as many cycles in the time -5:ts:5. If your y and g signals had the same ...
AJN's user avatar
  • 3,756
5 votes

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

The error is less than 9 PPM. The simulator simulates the circuit without knowing what circuit it is. The component models may contain some non-idealities to simulate real-world components, depending ...
Justme's user avatar
  • 130k
5 votes

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

The error you are getting in LTspice is caused by selecting a linear sweep. The total number of points is limited to 65536, which normally wouldn't be a problem because 15.26 Hz is less than 1 pixel ...
Bruce Abbott's user avatar
  • 55.6k
4 votes
Accepted

MATLAB analog filter impulse response

For a continuous time system the impulse function can be used to plot the impulse response. The system can be specified using zero-pole (...
Mario's user avatar
  • 8,155
4 votes
Accepted

Function to Simulate Realistic Waveform

It varies with the situation. In the real world, there will be some transmission line effects, mainly filtering out higher frequencies but also some reflections. I found a circuit lab schematic/...
Justin's user avatar
  • 5,954
4 votes

How to model Phase noise?

Does this example prove to you that the spectrum spreads ? The spectral plot uses dB (I find that more convenient) on the Y-axis, so consider it a logarithmic scale. You can see that I need to add A ...
Bimpelrekkie's user avatar
  • 80.2k
4 votes
Accepted

Transmitting data from MATLAB to FPGA

I have done something very similar in the past. My aim was to transfer an image (*.bmp) from PC to FPGA (internal BRAM), and send it back to PC after the watermarking process. As previously mentioned, ...
Chief's user avatar
  • 84
4 votes

Control Theory in MATLAB

By way of a simple illustration, say you have a system that is, essentially, an integrator and require to close the loop around it to establish some form of feedback control. The OLTF is: $$\small G(...
Chu's user avatar
  • 7,505
4 votes
Accepted

Generating a realistic sine wave in MATLAB

I have two approaches to do that when working in MATLAB. The first is to generate a clean sine wave, and then apply a distorting function. For instance applying x*(1+kx^2) for small k to your ...
Neil_UK's user avatar
  • 159k
4 votes
Accepted

How do we interpret frequency from fft command in matlab?

The output of the fft function will go from 0 Hz to fs/2, then -fs/2 to almost 0. If you ignore the 2nd half (for purely real signals), the following works well: For n samples at a sampling rate of ...
MikeP's user avatar
  • 1,591
4 votes

Does the bandwidth of an NBFM modulation change depending with the modulation index?

First note that the Carlson formula is only an approximation. Second, narrowband FM is defined as FM modulation for which the modulation index is small compared to one. When this is the case, the ...
Barry's user avatar
  • 15.8k
4 votes

How would this circuit work?

As the "Graphene frequency doubler paper" which you indirectly refer to states, their frequency doubler schematic uses non-linearity of a GFET's current voltage characteristic (Fig. 4) to ...
V.V.T's user avatar
  • 3,626

Only top scored, non community-wiki answers of a minimum length are eligible