Questions tagged [matlab]
MATLAB is a commercial numerical computer algebra system
597 questions
-1
votes
1
answer
72
views
How can I get Current and Voltage from PV cell?
The PV cell can be modelled with a current source, a diode and 2 resistors.
The following is the equation for single-diode model for a PV cell.
Except I and V, every variables are constants like Iph = ...
0
votes
1
answer
108
views
How to design a 6-pole Butterworth band-stop filter (300 Hz – 3400 Hz) in Matlab using lp2bs?
How to design a 6-pole Butterworth band-stop filter (300 Hz – 3400 Hz) in Matlab using lp2bs?
I’m working on a university project where I need to design a 6-pole Butterworth band-stop filter (notch) ...
-1
votes
1
answer
61
views
How to automatically run MATLAB and HSpice, one after another, in a loop?
This might not be the best place to ask this question. But I am pretty sure others have accomplished such task before.
I need to iteratively run MATLAB and HSpice. The series of steps that need to be ...
0
votes
0
answers
87
views
How can I continue to reduce this block diagram to a single-circuit diagram?
What I’ve done so far
Combined W₁ and Wₓ into an equivalent block W₁ₓ (second image).
Moved the summing junction, then combined W₁ₓ in series with W₂ to form W₁ₓ·₂, combined (1/W₁ₓ) in series with W₄...
0
votes
0
answers
84
views
State-space representation model
Can you help me with a state space representation of the electrical network below:
simulate this circuit – Schematic created using CircuitLab
I'm representing this network in a (mathematical) ...
2
votes
1
answer
97
views
V/F control for Induction Motor Control Issues
Currently I am doing calculation of V/F control for Induction motor (IM) control using Matlab.
I do simple voltage and current calculation based on the equivalent IM circuit. then get the torque based ...
2
votes
1
answer
131
views
CRC read calculation of ad7383-4 or ad738x
Data sheet
My Question: I've implemented CRC read on my ADC, but I'm not getting the correct results. I'm following the datasheet for the calculation, but something still seems off. Has anyone with ...
0
votes
0
answers
58
views
How do I train or code my ANN PV MPPT so that it could output 60V from the boost converter?
I'm currently designing an Artificial Neural Network PV MPPT. Currently the MPPT is working as it intended. Right now I want so that i can train or code my ANN block so that it can output a 60 volt ...
6
votes
4
answers
608
views
How to find the RMS value of a triangular function (homework)?
I have no idea where I went wrong with this homework question:
The waveform:
I deduced the function as:
$$
y=\begin{cases}
1000t & t\in [ 0,0.002]\\
-1000t+4 & t\in [ 0.002,0.006]\\
1000t-8 &...
1
vote
1
answer
129
views
Why doesn't my MOM code show the correct current vs position for finite dipole
The following is the PDF from EMpossible. MOM
Have anyone written matlab code according to Lecture-9c-Method-of-Moments-for-Thin-Wire-Antennas?
The following is my code in matlab.
...
0
votes
1
answer
95
views
Help Needed: PID Controller Issues in Simple Simscape Low-Power Buck Converter Implementation
Link to MATLAB & Simulink files: https://drive.google.com/file/d/10hG0oOyMZtza1jTbSUYh39C3fjJTs9c8/view?usp=sharing
I'm implementing a low-power buck converter with the following specifications:
...
0
votes
0
answers
60
views
TRP radiation pattern from 2D slices
I have 2D radiation patterns of power measurements on the XY, YZ and XZ planes.
The output is a *.csv file; in the first colunm we have the rotation angle from 0 to ...
0
votes
1
answer
96
views
Using LTSpice with Matlab for periodic analysis
I am trying to run LTSpice transient simulations automatically using Matlab. Currently, I am using a simple RLC circuit before applying my code to my needs.
I want to
1: set the initial conditions of ...
1
vote
1
answer
76
views
LTspice and Matlab Gradient Descent Optimization
I am new in LTspice and optimization. Could someone please get me started on how to use LTspice and MATLAB together to run a gradient descent optimization and update the value of parameters? I am ...
0
votes
1
answer
69
views
I need help identifying the purpose and type of a block in simulink of a DC motor modelling
I need to understand the purpose and type of the block encircled in blue from this simulink simulation from which i only have images, not the actual file.
1
vote
3
answers
228
views
The bode plot of proteus simulation and matlab transfer function is not same
I am trying to calculate bode plot of a circuit.
For proteus my frequency at -63dB is 18 kHz as sample the circuit connection and its bode plot is provided.
Using analytical approach I calculate the ...
3
votes
4
answers
274
views
Why is my differential equation for mass-spring-damper model not converging with ode45 in MATLAB?
I am trying to simulate an electronical device that can be modeled by a mass-spring-damper system with an additional non-linear force. The equation at the equilibrium for the system is the following :
...
0
votes
2
answers
234
views
MATLAB Fourier: Why do I see less harmonics the more I increase the sampling frequency?
I made MATLAB calculate the Fourier transform of these square wave pulses which have a frequency of 60Hz. I do not understand why, the more I increase the sampling frequency, the less visible the ...
1
vote
1
answer
100
views
Changing the Limits of the Graph When Trying to Model the Shockley Equation in MatLab Shifts the Position of the Curve [closed]
I have been trying to create a piecewise linear model of a diode through curve fitting. While trying to implement the code below, I ran into a strange bug that is causing my output curve to shift to ...
0
votes
1
answer
130
views
Matlab simulation of PCB IFA
I am designing a PCB IFA and to get used to simulating it later down the road, I decided to first simulate an existing, known working design.
Known design for 0.062" Substrate (page 3)
This is ...
0
votes
1
answer
172
views
Three-phase controlled rectifier power reversal issue in MATLAB Simulink
I have built a fully controlled three-phase rectifier in MATLAB Simulink. Now according to theory for RL load as I increase firing angle from 90 deg to 180 deg, the output voltage should become more ...
0
votes
0
answers
92
views
Plotting the bode plot of a high pass filter using matlab
I am trying to theoretically find the frequency response of the circuit given below:
Firstly i found the impedance value of the RC Ladder by applying the equation below, then i defined this as "...
2
votes
1
answer
119
views
How can I use MATLAB to show that the Doppler effect destroys orthogonality of OFDM subcarriers?
I am trying to get a visual representation of how the Doppler effect destroys the orthogonality of the subcarrier and understand this effect.
I plotted three orthogonal subcarriers in MATLAB:
...
0
votes
1
answer
145
views
Different frequency responses for series RLC series circuit using Multisim vs. MATLAB
I have been trying to simulate the following RLC circuit:
When I simulated in Multisim Live I obtained the following frequency response, which I expected based on the values I used to calculate ...
1
vote
1
answer
195
views
How to obtain the pole zero map and step response of the 2nd order system and determine the mode of damping in the system using MATLAB?
$$\frac{C(s)}{R(s)}=\frac{\omega_n^2}{s^2+2\zeta \omega_n s+\omega_n^2}$$
Obtain the pole zero map and step response of the 2nd order system and determine the mode of damping in the system. If the ...
1
vote
2
answers
177
views
How to go with this RC circuit?
So, i've been asked to get the differential equations (or model) for this circuit:
V1=15 u(t)V, R1=10 ohm, R2 = 20 ohm, C1=10uF, C2=20uF
I'm just a beginner, and don't know if the differential ...
0
votes
2
answers
203
views
34401A Remote Measurement Time
I am using an HP 34401A as an ADC for data acquisition. I am triggering the device within a 'for' loop in MATLAB, so that I can synchronize the measurement with a separate device. I am able to collect ...
0
votes
0
answers
140
views
Reference Voltage Tracking for DC-DC boost converter
I have a boost converter which works perfectly with an s-domain controller (using a type-3 compensator and dual loop). Now, I need to do this using digital control (z-domain). I have converted the s-...
0
votes
0
answers
141
views
Why does my MATLAB calculation/simulation differ greatly from my LTspice simulation?
Here is my circuit in LTspice.
The frequency AC is here:
This is DC with .op command.
--- MOSFET Transistors ---
Name: m1
Model: nmos-sh
Id: ...
1
vote
1
answer
64
views
Problem with Arduino Uno sending data to MATLAB
I am sending data from an Arduino Uno to MATLAB. Below is my Arduino and MATLAB code:
Arduino Code:
...
0
votes
1
answer
208
views
How to find poles and zeroes in this kind of transfer function?
How do I find poles and zeroes from this complex transfer function?
$$
H(s)
= \frac{2959}{100\,s}
- \frac{ 171\, \Gamma\left( \frac{7447}{10000} \right)}
{200\, s^{7447/10000}}
$$
I used the ...
0
votes
0
answers
97
views
0
votes
2
answers
193
views
Issue with 3rd order Butterworth low pass filter simulation
I wrote up some code in MATLAB that's supposed to simulate the frequency response of a third order passive low pass Butterworth filter with a cutoff at 10kHz. The curve seems to match the results I ...
2
votes
2
answers
139
views
Why are the current-voltage characteristics of a bipolar transistor in MATLAB and LTspice different?
I simulated the 2N5089 bipolar transistor in both programs. The output I-V curve is completely different, although both programs use the Ebers-Moll model.
Spice-model of the transistor:
...
2
votes
1
answer
339
views
LTSpice PMOS model differs from by scratch implementation
I have this circuit in LTSpice to test a PMOS model:
and this matlab function that implements a basic pmos with the characteristics equations:
...
0
votes
0
answers
49
views
Why I am not getting same values for exported simulink variables as stepinfo?
I am using MATLAB 2015a and I am trying to get stepinfo parameters of output that was exported from Simulink to MATLAB workspace but I am not getting same values as if try to get stepinfo for MATLAB ...
0
votes
1
answer
148
views
Incorrect cutoff frequency using two Sallen-Key filters to build a bandstop filter
I'm currently having trouble troubleshooting my answer. I have to make a bandstop filter that has a cutoff frequency of 100 rad/s, and 10^6 rad/s using two Sallen-Key filters. I made the low and high ...
0
votes
0
answers
60
views
How can I correlate a RSSI value to a distance measurement more efficiently?
I want to develop a trilateration algorithm using 3 fixed advertising beacons in different parts of a room and a mobile receiver which continuously gets the RSSI values of the 3 fixed beacons and ...
0
votes
1
answer
250
views
Linear line on loglog plot
I'm trying to plot a -20dB/dec line on MATLAB but can't seem to get it correct. I know that a linear line in a loglog plot is actually an exponential curve in the linear scale.
So writing a y = mx + ...
1
vote
0
answers
93
views
Wrong plot for Ids for output characteristics (MOSFET), does new graph look reasonable?
EDIT: This is not a duplicate of 'Wrong graphs for Ids'. That one focuses on the transfer characteristics, while this one addresses the output characteristics. This distinction was also mentioned in ...
1
vote
0
answers
151
views
Wrong Graphs for Ids (MOSFET)
EDIT:
I have now obtained this graph, using the suggested changes. Does it look reasonable?
And this one maybe more clearer:
I'm writing a MATLAB script that employs Shockley's model to derive the ...
0
votes
1
answer
70
views
Confusion regarding simulation in Simulink?
Please check the attached snap especially the portion in red marked area, which is simulation stop time and it has default value of 10? Is it 10 second or any other unit? According to my experience, ...
1
vote
0
answers
70
views
How to determine beamforming pattern?
I have a beamforming vector, which includes amplitude and phase information. How can I determine the corresponding beamforming pattern for the antenna and plot it in Matlab? For example, I have a ...
2
votes
0
answers
143
views
Type 3 compensator with opamp compare calculation/simu and measured difference
I'm designing a type 3 compensator with an opamp for a flyback which is operating in a constant voltage mode.
Therefore I measured the plant and started to design a suitable type 3 compensator to ...
0
votes
2
answers
215
views
Why does MATLAB show a pole in bode plot of an underdamped second order system at natural frequency?
I am using the sisotool in MATLAB to obtain the bode plot of the following transfer function:
MATLAB marks a pole at wo which is approximately 11.18
What is the meaning of this? How would you even ...
0
votes
1
answer
539
views
Quick PMSM FOC PI controler design
For a Simulink Model I am looking for a quick and easy way to estimate PI-controller parameters for a speed control loop and Id and Iq controler of a PMSM using FOC.
I don't have a real motor just the ...
0
votes
0
answers
79
views
Stuck during designing a PI Controller
I'm trying to design a PI Controller on the basis of this paper: "Design of robust PI control systems based on sensitivity analysis and genetic algorithms." by Jau-Woei Perng • Shan-Chang ...
3
votes
0
answers
62
views
What kind of model can be used to simulate over- and under voltage in a Li-Battery pack?
So far I have not much experience with modeling in the field of lithium-ion cells or batteries except equivalent circuit models (ecm)-models which I've implemented and used for simulations in Matlab/...
2
votes
1
answer
184
views
Rotated gyroscope 180 degrees but integration shows 90
I'm a student new to sensors. I'm currently calibrating the gyroscope from the following IMU: ICM42670. I was able to get the bias by leaving the gyro for some time and getting the average of the ...
0
votes
1
answer
109
views
pulse generator MATLAB
How to create a rectangular waveform with amplitude 18 to -3 using pulse generator? If I put 18 as the amplitude then the wave is between 18 and 0. How do I change that to 18 to -3?