Generate a triangular waveform using Multisim/MATLAB

  • Thread starter Fatima Hasan
  • Start date
  • Tags
    Waveform
In summary, I was having trouble getting my circuit to work in a software called Multisim. I changed the value of the capacitor and it worked fine.
  • #1
Fatima Hasan
319
14
Homework Statement
Attached below.
Relevant Equations
-
Using any Electrical Engineering software:
lab2temp2.png


I tried to solve this question using Multisim. Here's my attempt:

exp2-temp.png
That's what I got :
exp2-temp.png


Kindly,could someone tell me where is my mistake ?
 
Physics news on Phys.org
  • #2
Does each small subsection work? I would try breaking it up into two op-amps then see if each one works with that setup.

I don't know much about the circuit setup in that software I am noticing that on the right op-amp the way the voltage rails are connected looks different from the first one. Is that okay or allowed?
 
  • #3
Joshy said:
I am noticing that on the right op-amp the way the voltage rails are connected looks different from the first one. Is that okay or allowed?
It's the same as the figure shown above.
I didn't get any error.
 
  • #4
Joshy said:
I don't know much about the circuit setup in that software
I tried to simulate in MATLAB but I didn't find op-amp 741.
 
  • #5
Is C1 really connected to U3-6? I don't see a dot there.
 
  • #6
DaveE said:
Is C1 really connected to U3-6? I don't see a dot there.
Yes, it is connected.
screenshot_115.png
 
  • #7
What's the VDD seemingly floating or is it connected to the offset? Right up against the offset pins on U3.

Earlier comment I was meaning between the left and right op-amp; not just the reference image. You assign VDD and VCC to each op-amp, but for some reason the one on the right says VCC and 15V. It's inconsistent. I suppose if the nets are equal then maybe it doesn't matter... wasn't sure.
 
  • #8
Joshy said:
What's the VDD seemingly floating or is it connected to the offset? Right up against the offset pins on U3.

Earlier comment I was meaning between the left and right op-amp; not just the reference image. You assign VDD and VCC to each op-amp, but for some reason the one on the right says VCC and 15V. It's inconsistent. I suppose if the nets are equal then maybe it doesn't matter... wasn't sure.
I tried.. I didn't get the required waveform..
 
  • #9
Can you break up the two op-amps around the center put and put an input voltage source to each one; measure the output to see if you're getting what you expect? Maybe omit R1 for now.
 
  • #10
  • #11
DaveE said:
At pin 6, the output?
No, I didn't connect the capacitor to pin 6.
Sorry for misunderstanding, I didn't read your previous question well.
 
  • #12
Fatima Hasan said:
No, I didn't connect the capacitor to pin 6.
Sorry for misunderstanding, I didn't read your previous question well.
It should be. Try it that way.
 
  • #13
DaveE said:
It should be. Try it that way.
screenshot-115.png

The result:
screenshot-115.png
 
  • #14
Now check that every component at that node is connected. If you make all connections a "T" intersection with a dot, then you'll know. Or verify it some other way, like the netlist for example.
 
  • #15
DaveE said:
Now check that every component at that node is connected. If you make all connections a "T" intersection with a dot, then you'll know. Or verify it some other way, like the netlist for example.
I checked. C1, R1, pin6 , and channel A (oscilloscope) are connected together at the same node, but the result is the same (straight line at the origin).
 
  • #16
Are you sure C1 should be 100pF. My rough calculation says that the ramp of the triangle (the time it takes C1 to charge) should be about 7V/usec. That is much faster than a 741 op-amp can change it's output (slew rate is about 0.1 V/usec). Also, your oscilloscope is set in the msec range. That is an odd combination for a circuit like this. Still, I'm not sure why it wouldn't oscillate at some frequency.
Try a larger value for C1, like 0.1uF maybe.
 
  • Like
Likes Joshy and Fatima Hasan
  • #17
DaveE said:
Are you sure C1 should be 100pF. My rough calculation says that the ramp of the triangle (the time it takes C1 to charge) should be about 7V/usec. That is much faster than a 741 op-amp can change it's output (slew rate is about 0.1 V/usec). Also, your oscilloscope is set in the msec range. That is an odd combination for a circuit like this. Still, I'm not sure why it wouldn't oscillate at some frequency.
Try a larger value for C1, like 0.1uF maybe.
Got it !
After changing the value of the capacitor to 0.1uF.
screenshot-115.png


Thanks for your help.
 
  • Like
Likes DaveE

Related to Generate a triangular waveform using Multisim/MATLAB

1. How do I generate a triangular waveform using Multisim/MATLAB?

To generate a triangular waveform using Multisim, you can use the Triangle Waveform Generator component from the Basic Analog and Digital category. In MATLAB, you can use the "sawtooth" function to generate a triangular waveform.

2. Can I control the frequency and amplitude of the triangular waveform?

Yes, you can adjust the frequency and amplitude of the triangular waveform in both Multisim and MATLAB. In Multisim, you can change these parameters by double-clicking on the Triangle Waveform Generator component and adjusting the settings. In MATLAB, you can specify the frequency and amplitude as arguments in the "sawtooth" function.

3. How can I plot the generated triangular waveform?

In Multisim, you can use the Oscilloscope component to plot the triangular waveform. In MATLAB, you can use the "plot" function to plot the waveform and the "xlabel" and "ylabel" functions to label the axes.

4. Is it possible to add noise to the triangular waveform?

Yes, you can add noise to the triangular waveform in both Multisim and MATLAB. In Multisim, you can use the Noise component to add random noise to the waveform. In MATLAB, you can use the "awgn" function to add white Gaussian noise to the waveform.

5. Can I export the generated triangular waveform data to a file?

Yes, you can export the waveform data to a file in both Multisim and MATLAB. In Multisim, you can use the Data Display component to save the data as a CSV file. In MATLAB, you can use the "csvwrite" function to save the data as a CSV file or the "save" function to save it in a MAT file.

Similar threads

  • Engineering and Comp Sci Homework Help
Replies
15
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
29
Views
3K
  • Engineering and Comp Sci Homework Help
Replies
12
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
16
Views
3K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
1K
  • Electrical Engineering
Replies
9
Views
6K
Replies
16
Views
2K
Replies
5
Views
478
Replies
10
Views
1K
  • Engineering and Comp Sci Homework Help
2
Replies
49
Views
3K
Back
Top