Black-box design to create sawtooth waveform

In summary: RC filter after the opamp to stabilize it.Could someone please explain how I should use the Fourier algorithm to find my answer?ThanksIn summary, the student is not sure what is being asked of them and is struggling to understand what they need to do. They are provided sinusoidal signals as inputs, but need to scale each input appropriately and combine them to find the answer. A summing amplifier will be used to combine the sinusoidal signals and the student is asked to explain how they should use the Fourier algorithm to find their answer.
  • #1
peasngravy
72
6
Homework Statement
FIGURE 2(a) shows a ‘black box’ that is to partially synthesise a ‘sawtooth’ waveform of FIGURE 2(b) by using the Fourier series
algorithm:
Relevant Equations
v(t) = 2/pi(sin.omega.t)
Hi

I received some great help yesterday and i was hoping someone would be able to help me out again today

Note: the given equation is very long and would look very messy without being typed in the correct format so I didn't enter the entire thing in the relevant equations box; instead it is included in the screenshot below

1603982937839.png

I am not sure at all what is being asked of me here. There are no Fourier algorithms in any of my notes so I am struggling with what I can do with this.

What I know so far is that the amplitude is 5 volts, and the frequency is 1000hz (1 cycle per ms on the graph).

Could someone please explain how I should use the Fourier algorithm to find my answer?

Thanks
 
Physics news on Phys.org
  • #2
peasngravy said:
Homework Statement:: FIGURE 2(a) shows a ‘black box’ that is to partially synthesise a ‘sawtooth’ waveform of FIGURE 2(b) by using the Fourier series
algorithm:
Relevant Equations:: v(t) = 2/pi(sin.omega.t)

Hi

I received some great help yesterday and i was hoping someone would be able to help me out again today

Note: the given equation is very long and would look very messy without being typed in the correct format so I didn't enter the entire thing in the relevant equations box; instead it is included in the screenshot below

View attachment 271794

I am not sure at all what is being asked of me here. There are no Fourier algorithms in any of my notes so I am struggling with what I can do with this.

What I know so far is that the amplitude is 5 volts, and the frequency is 1000hz (1 cycle per ms on the graph).

Could someone please explain how I should use the Fourier algorithm to find my answer?

Thanks
Yoiks! My first inclination would be to use an "integrate and dump" circuit; I'm not sure what they want you to do with the FS approximation and opamps. Are you allowed to use transistors too, or just opamps and passive components?
 
  • Like
Likes peasngravy
  • #3
It doesn't really state either way but I would suspect just passives and opamps. It really does seem a few levels above the rest of the questions
 
  • #4
Step back a bit and take a broader look at it.
1603991855684.png

The sine functions are already given as inputs to the box. The "formula" is a weighted sum of them...
 
  • Like
Likes peasngravy and berkeman
  • #5
So the formulas then become
5sin(1000*t)
5sin(2*1000*t) and so on?

t is obviously time, but what time do I need to use for these figures?
 
  • #6
gneill said:
Step back a bit and take a broader look at it.
View attachment 271811
The sine functions are already given as inputs to the box. The "formula" is a weighted sum of them...
Oh jeeze, I missed that. Thanks!
 
  • #7
peasngravy said:
So the formulas then become
5sin(1000*t)
5sin(2*1000*t) and so on?

t is obviously time, but what time do I need to use for these figures?
As gneill says, you are provided the sinusoidal signals as inputs. It looks like you just need to scale each input appropriately and combine them... Can you say what kinds of opamp circuits would be used for each of those functions? And are there ways to simplify it down to just a few or one opamp?
 
  • Like
Likes peasngravy and gneill
  • #8
berkeman said:
As gneill says, you are provided the sinusoidal signals as inputs. It looks like you just need to scale each input appropriately and combine them... Can you say what kinds of opamp circuits would be used for each of those functions? And are there ways to simplify it down to just a few or one opamp?

I think it will just be a very basic summing amplifier

I did find this page which looks like it may be of some help for the circuit http://www.ecircuitcenter.com/Circuits/opsum/opsum2.htm

But I don't even know where to begin with those sinusoidal signals as an input - could you give me a couple of pointers on what I should do there?

It's the time part I am unsure about. How do I know what value of time to put into the equation? Do I just pick the time it takes for one cycle, i.e. 0.001 seconds?
 
Last edited:
  • #9
peasngravy said:
I think it will just be a very basic summing amplifier
That sounds right, but I'd like to see your attempt at including the scaling in that summing amplifier...
peasngravy said:
I did find this page which looks like it may be of some help for the circuit http://www.ecircuitcenter.com/Circuits/opsum/opsum2.htm
That's close, but it's an inverting topology summing amplifier. You can look for a non-inverting version or follow that one with a unity-gain inverting opamp stage...
peasngravy said:
It's the time part I am unsure about. How do I know what value of time to put into the equation? Do I just pick the time it takes for one cycle, i.e. 0.001 seconds?
peasngravy said:
What I know so far is that the amplitude is 5 volts, and the frequency is 1000hz
To draw the opamp circuit, you don't need to worry about that. I'm guessing you are asking about the simulation part of the question. To be honest, I don't know offhand if you want ##\frac{\omega}{2\pi}## to be the 1kHz frequency or if you want twice or half of that. It's easy to just try the different values in your simulation to verify which choice gives you the right waveform.

(You could also look up the Fourier Series expansion of that waveform to see what value of ##\omega## then are using. I'm too lazy to do that right now...) :smile:
 
  • Like
Likes peasngravy
  • #10
I was asking about those as I thought I may need that to work out the input voltages at each resistor at the input. I suppose I could go for 1v and see what happens

I am going to give this a go tomorrow in that case, as it's getting late here. I will start off with a 4 resistors, 1k, 2k, 3k and 4k and use a bit of trial and error from there. I will keep reporting back as no doubt I will get stuck again... :)
 
  • Like
Likes berkeman
  • #11
t is obviously time, but what time do I need to use for these figures?

Since analog devices are continuous-time devices (within their bandwidth), you don't need to worry about the "t" in the Fourier representation, it disappears; i.e. it becomes an infinite sum of infinitesimals, which ends up being unity here.
 
  • #12
I am having a go at this now without too much luck.

I tried calculating 4voltage inputs, with the equations 5sin(1000), 5sin(1000*2), 5sin(1000*3) and 5sin(1000*4) as I didn't really know what else to do. I made each of these signals 1000, 2000, 3000 and 4000hz
 
  • #13
Don't worry about specific input voltage values for a particular instant in time. The black box circuit won't contain any time-dependent components like capacitors or inductors. It's simply a summing circuit. You just want to have the summing inputs have the appropriate weights (gains).

The time-dependent part comes when you simulate the system with Spice. It provides built-in voltage sources where you can simply supply the required voltage and frequency, and everything is then handled for you.
 
  • #14
So where I've got to is this:

As there are 4 inputs then ωt, time interval, is 0.25ms

So
5sin(ωt) = 5sin^-1 (0.25) = 1.25v, 14.5°
5sin(2ωt) = 5sin^-1 (2*0.25) = 2.5v, 30°
5sin(3ωt) = 5sin^-1 (3*0.25) = 3.75v, 48.6°
5sin(4ωt) = 5sin^-1 (4*0.25) = 5v, 90°

Gain = Vout/Vin = Rf/Rin

Gain of 1st input = 5/1.25 = 4 = rf/rin
If i make Rf 10k, then Rin = 10k/4 = 2.5k

And follow this on for the rest of the inputs - am i on the right track?

PS - is there a way to type equations so they appear correctly as fractions?
 
  • #15
peasngravy said:
PS - is there a way to type equations so they appear correctly as fractions?
Yes. Click on the "LaTeX Guide" link below the Edit window to see how to type equations here.

You can also click Reply on my post to see how I wrote this fraction:

Gain of 1st input = ## \frac{5}{1.25} = 4 = \frac{r_f}{r_{in}}##

(or on a separate line): $$ \frac{5}{1.25} = 4 = \frac{r_f}{r_{in}}$$
 
  • #16
peasngravy said:
So
5sin(ωt) = 5sin^-1 (0.25) = 1.25v, 14.5°
5sin(2ωt) = 5sin^-1 (2*0.25) = 2.5v, 30°
5sin(3ωt) = 5sin^-1 (3*0.25) = 3.75v, 48.6°
5sin(4ωt) = 5sin^-1 (4*0.25) = 5v, 90°
I don't think you need that for anything. Can you show us the opamp schematic with the resistors labeled? Have you started drawing your simulation circuit yet?
 
  • Like
Likes peasngravy
  • #17
this is my schematic so far with those gains, but it doesn't have the correct waveform yet

1604068465552.png
 
  • #18
peasngravy said:
this is my schematic so far with those gains, but it doesn't have the correct waveform yet

View attachment 271849
The input voltages should all have an amplitude of 5V, since those are the inputs to your block. And this is still an inverting topology, so to get the correct waveform you will need to invert the output (and maybe add an offset?)... Oh, and you will need wider power supply rails than just +/-5V, especially with a TL081 opamp -- Can you say why? :smile:

1604068690919.png
 
  • #19
Oops I just checked the TL 081 requirements and it needs a supply of +/-7-36V
 
  • #20
peasngravy said:
Oops I just checked the TL 081 requirements and it needs a supply of +/-7-36V
Yeah, it's definitely not a rail-to-rail opamp, but it should be fine for this simulation. I'd just set its rails to +/-15V to give plenty of headroom.
 
  • #21
I changed this now - I am just learning about op-amps now so I will make many more of these silly mistakes, unfortunately!

I changed that, and flipped the op-amp around, but I get nothing like what I am looking for. I added a dc offset at the inverting terminal.

I feel like I am way out of my depth with this right now :(
 
  • #22
peasngravy said:
I changed that, and flipped the op-amp around, but I get nothing like what I am looking for. I added a dc offset at the inverting terminal.
Can you post your updated schematic? And be careful -- the gain of a non-inverting summing stage is different from that of an inverting stage...
 
  • #23
Offset is set to -6 right now but I've just been messing around with different values for it for now

just editing to add - op amp rail supply is now +- 15, i just forgot to change the name of the terminals
 
Last edited:
  • #24
I just want to say i appreciate all the help you have given me so far. The theory side of this stuff is all new to me
 
  • Like
Likes berkeman
  • #26
So if i want the sum of the 4 inputs to be 5v, with a 5 volt input to each one, I would need them all to have a gain of -4 right, giving 4 inputs of 1.25V making a total Vin of 5v?

So a feedback resistor of 10k, with each input resistor being 2.5k, this would give me a gain of -4?

As Gain = Vin/Vout = -(Rf/Rin)
 
  • #27
peasngravy said:
So if i want the sum of the 4 inputs to be 5v, with a 5 volt input to each one, I would need them all to have a gain of -4 right, giving 4 inputs of 1.25V making a total Vin of 5v?

So a feedback resistor of 10k, with each input resistor being 2.5k, this would give me a gain of -4?

As Gain = Vin/Vout = -(Rf/Rin)
The gains for each component (sin waves of different frequencies) are given in your first post as the Fourier Series coefficients...

1604076029855.png
 
  • #28
I see - so those 4 voltages I calculated from the sin functions earlier should be how I calculate the gains i need?

i.e. 5/1.25
5/2.5
5/3.75
and 5/5 ?
 
  • #29
peasngravy said:
I see - so those 4 voltages I calculated from the sin functions earlier should be how I calculate the gains i need?

i.e. 5/1.25
5/2.5
5/3.75
and 5/5 ?
Something like that. Once you get the sawtooth waveform, you can fine tune the coefficients to get the 2.5V peak amplitude (plus remember to include the 2.5V constant offset term, both in the FW (which they omitted in the problem statement) and in your opamp circuit).
 

Attachments

  • 1604076660788.png
    1604076660788.png
    15.6 KB · Views: 97
  • #30
These need to be AC supplies with set frequencies right? otherwise i'll never get a waveform
 
  • #31
Yes, the diagram shows a peak amplitude of 5V and you said the bade frequency is 1kHz. You increase the frequencies of each AC Source as shown in the FS. Can you paste a screenshot of your AC Source definition for the first one?
 
  • Like
Likes peasngravy
  • #32
berkeman said:
Yes, the diagram shows a peak amplitude of 5V and you said the bade frequency is 1kHz. You increase the frequencies of each AC Source as shown in the FS. Can you paste a screenshot of your AC Source definition for the first one?
1604079151684.png


(i spent far longer than I should have trying to post this reply by hitting OK on the screenshot :smile:)
 
  • #33
From the problem statement figure, you want the frequency of the first one to be ##2\pi f## where f=1kHz, the frequency of the 2nd source to be twice that, and so on. And the peak amplitude of each is 5V, no?
 
  • #34
BTW, that Fourier Series for the sawtooth wave doesn't look quite right to me, but I'm looking into that more now. If you can post your circuit after setting up the 4 AC Sources and the output waveform that it generates, that would be a help.
 
  • #35
Ok so I set up the sources with the following frequencies, and got this:
6283
12566
18849
251321604080586814.png

Regarding the peak, you're right of course, I just overthought that one, forgetting that i was only looking for half of a wave
 

Similar threads

  • Engineering and Comp Sci Homework Help
Replies
1
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
8
Views
332
  • Engineering and Comp Sci Homework Help
Replies
13
Views
266
Replies
6
Views
1K
Replies
16
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
3
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
6
Views
5K
  • Engineering and Comp Sci Homework Help
Replies
15
Views
5K
  • Quantum Interpretations and Foundations
Replies
5
Views
850
  • Classical Physics
Replies
1
Views
2K
Back
Top