Go Back   Home > Forums > General Interest > Everything Else

Everything Else Anything related to audio / video / electronics etc) BUT remember- we have many new forums where your thread may now fit! .... Parts, Equipment & Tools, Construction Tips, Software Tools......

Please consider donating to help us continue to serve you.

Ads on/off / Custom Title / More PMs / More album space / Advanced printing & mass image saving
Reply
 
Thread Tools Search this Thread
Old 31st July 2011, 01:44 PM   #1
Dr_EM is offline Dr_EM  United Kingdom
diyAudio Member
 
Dr_EM's Avatar
 
Join Date: Oct 2006
Location: Swindon
Default Applying linearising feedback to optical compressor

Hello all, I've been working on designing and building my own optical compressor for a while and it'd been going quite well. I've now got a bit stuck on changing the design from feedforward to a feedback system, so that the response of the CdS cells can be linearised, with an aim to reduce distortion.

I had pictured this as a simple exercise but now I've come to actually implement it, I'm a little confused! I expect there's more than one way to do it but ultimately I don't want to have to change my existing design too much as it already gives good performance. Here's my design in SwCad, it misses the audio section as there are no facilities to use a CdS cell in the software, so only the sidechain and metering are shown:

Click the image to open in full size.

This exact circuit is built on breadboard and working fine (with LED current forced to 10uA or so min). The metering will naturally be changed to read from a second, matched, CdS cell and I'm confident about adding this. I had planned to also use this cell as a source of feedback for the sidechain to linearise the system, but looking at the LA4A (I had avoided looking at existing designs till now as I wanted to see what I came up with myself) I'm not sure how exactly the feedback is applied, but it appears to not use the metering cell to do it:

Urei LA 4 Schematic

Any thoughts on how this design is implementing feedback? How might I adapt it into my design or is there indeed a more simple way for me to do this using my second matched cell? My compressor is designed to offer some stereo functionality as a stereo bridge setup too btw, one sidechain is to be shared.


I include my testing results for CdS cells. I added a straight min to max line to show how the cell response doesn't quite follow this. This has been the case for all cells I've tested, they 'sag' in the middle, or possibly give more extreme values at the ends. Linearising should make them closer to the straight line, I think.

Any input appreciated!
Attached Images
File Type: png Optical compressor current schem.png (137.4 KB, 144 views)
File Type: png CdS cells graph.png (114.7 KB, 125 views)
  Reply With Quote
Old 31st July 2011, 06:37 PM   #2
gootee is offline gootee  United States
diyAudio Member
 
Join Date: Nov 2006
Location: Indiana
Blog Entries: 1
How are you using the CdS cells? Do they have LEDs paired with them?

I developed a circuit that linearizes an LDR, which is just an LED encapsulated with a CdS cell, to make a voltage-controllable resistor. I have it in SwCADIII (LTSpice). I do have LTSpice models of LDRs. The linearizing circuit was not really trivial, even assuming matched LDRs. My circuit is actually just a voltage-controlled resistance, with linear resistance response of 200k Ohms per volt from about 500 Ohms to 1 Meg Ohm. It takes about 0.5 seconds worst case to go from one commanded resistance to another. So it might not be useful to you.

Now that I look at it, it is probably WAY too complicated, since it results in "perfect" linearization, which wouldn't be perfect in practice even if you used two perfectly-matched LDRs.

But there should be at least two other ways to do it:

One idea is that the result of placing a mathematical function in the feedback loop of a noninverting opamp circuit is that the output becomes the inverse mathematical function. So then you should be able to cancel one with the other, or, linearize? I haven't tried this type of thing, much, and it was years ago.

A much simpler idea would be to use an "exponential function" circuit to sum with the LDR control curent, to remove the logarithmic nature of the LDR response curve (since log and exp are inverse functions of each other). Just scale the exponential response until it best-cancels the non-linearity of your sort-of-logarithmic CdS curve. I think there are exp and log circuits in AN-20 and AN-31 at national.com.

So let's see... If you have an LDR with a resistor in series with the LED, then it would basically be voltage-controlled instead of current-controlled. If you put that same voltage on the input of an opamp that had the CdS cell of another (matchd) LDR in its feedback loop, and the same value resistance in series with its LED, to which you also applied the input voltage, and then you summed the opamp's output voltage with the first LDR's original control voltage... what would happen? I'll go try it.

There is a little more about all of those in this thread:

A precision LED/LDR-based Attenuator

Tom
  Reply With Quote
Old 1st August 2011, 11:40 AM   #3
Dr_EM is offline Dr_EM  United Kingdom
diyAudio Member
 
Dr_EM's Avatar
 
Join Date: Oct 2006
Location: Swindon
Thanks for your reply! Uncovered lots of interesting stuff

Yep, my LDRs are paired with high output green LEDs to produce those curves.

Your linearising circuit sounds interesting, I saw mention of it in the thread you linked. It may be overly complex, absolute accuracy is not essential here since even with no linearisation distortion only becomes very noticeable with relatively high gain reduction and certain source material. Of course adding attack and release time cuts it out too, but I'd like to option of fast limiting/natural response and high compression. Perhaps we can simplify the circuit for this relatively crude application?

The exponent function in the control/sidechain is a really attractive solution as it avoids feedback and possible issues of altering the timing control function that feedback could bring. It won't give a perfect linear response, but far more linear than what I have measured now, which is indeed very close to log. I don't give the cells total darkness like people making volume controls will, as this greatly slows their reponse when a transient comes back in. I give the LED a minimum current of around 10uA, this still leaves me plenty of dynamic range for this application and as a consequence I suspect the cell response is closer to log than if it were taken to absolute darkness.

Anyhow, I think I've found the correct circuit from AN-31:

Click the image to open in full size.

So I can imagine placing this after all the threshold, attack/release timing circuits and in no way affecting their functionality, which is nice. It'd take some effort to adjust the reponse to be a 'line of best fit' when related to my response graphs but I can be done. I'd probably forego the matched transistor pair and tempco resistor as absolute accuracy is not achievable anyhow. Some distortion may be left, but hopefully it'll just be musical/valve like non-linearity.


As much as I like that solution, I suspect that what you are describing in your last paragraph is actually simpler? I can't quite get to a schematic from the description, if you have any drawn I'd be very keen to see them! It sounds like it could be implemented around the LED drive (VCCS) in my circuit and thus be an ideal solution for me. The graphs were created to match CdS cells for this purpose, CdS 6 and CdS 2 make a nice pair and hopefully I could drive the meter from this feedback cell too.

Thanks again and any further guidance is much appreciated! This seems to be an area you've researched quite extensively so I'm keen to learn from your knowledge
Attached Images
File Type: png anti-log.png (71.6 KB, 114 views)
  Reply With Quote
Old 2nd August 2011, 03:00 AM   #4
gootee is offline gootee  United States
diyAudio Member
 
Join Date: Nov 2006
Location: Indiana
Blog Entries: 1
I went back through my old stuff and found one of my first versions, which is quite simple. The schematic shown uses a linearized LDR to create a voltage-controlled resistor that responds linearly, at about 200k per volt, from something like .05 Volt to 5 Volts.
Attached Images
File Type: png LDR_Lin.png (16.0 KB, 51 views)
  Reply With Quote
Old 2nd August 2011, 03:17 AM   #5
gootee is offline gootee  United States
diyAudio Member
 
Join Date: Nov 2006
Location: Indiana
Blog Entries: 1
I have uploaded the LTSpice files for the LDR in a zip file, and the schematic in a .txt file. For the schematic, just rename the file without the .txt extension. Unzip the zip file and put the files in the same folder as the .asc file containing the schematic.

Go to the tools icon and select the Spice tab and specify the Alternate Solver.

Have fun!

P.S. You can plot the resistance of the LDR by first plotting the voltage and then right-clicking on the voltage's name in the plot heading and changing the plot expression by adding /I(I2), to divide by the current from the current source that's in that version.

P.P.S. I forgot to mention that I was messing around with the capacitor values. They could probably be much smaller, in a real circuit (or in the sim if you don't use infinitely-steep edges when switching the control signal, like I did).
Attached Files
File Type: zip vtl5c2.zip (4.0 KB, 9 views)
File Type: txt LINEARIZER_vtl5c2_1aug11.asc.txt (5.9 KB, 9 views)

Last edited by gootee; 2nd August 2011 at 03:25 AM.
  Reply With Quote
Old 3rd August 2011, 11:27 AM   #6
Dr_EM is offline Dr_EM  United Kingdom
diyAudio Member
 
Dr_EM's Avatar
 
Join Date: Oct 2006
Location: Swindon
Thanks for the schematic and vactrol model, it's working in my SwitcherCAD. It looks fairly simple, part of the circuit is a VCCS, which my design already uses, so the only new part is U2, which appears to me to be some sort of difference amplifier? Control voltage minus the feedback voltage?

I just can't quite get my head around how to implement it in my design, I think building it for real in this case will make a bit more sense to me, I have matched vactrols to hand. I'm not even quite sure what I should be seeing I guess, until it's fully implemented and then a reduction in distortion when using fast compression speed settings should be observable/audible.


Quote:
Originally Posted by gootee View Post
So let's see... If you have an LDR with a resistor in series with the LED, then it would basically be voltage-controlled instead of current-controlled. If you put that same voltage on the input of an opamp that had the CdS cell of another (matchd) LDR in its feedback loop, and the same value resistance in series with its LED, to which you also applied the input voltage, and then you summed the opamp's output voltage with the first LDR's original control voltage... what would happen? I'll go try it.

Is this concept the same as the schematic you posted? It sounds a little different to me, perhaps easier to implement.

I tried the anti-log circuit in CAD and I'm not so optimistic for that route now. It's not the neatest circuit, it has a lot of quirks that need working out!
  Reply With Quote
Old 4th August 2011, 01:30 AM   #7
gootee is offline gootee  United States
diyAudio Member
 
Join Date: Nov 2006
Location: Indiana
Blog Entries: 1
The linearization circuit I gave is actually not from the description you quoted from my earlier message.

My circuit just responds to the input voltage, to set the resistance of the bottom vactrol. Modify the voltage source (or disconnect it and use a different one) to be a plain DC voltage, between 0 and 5 Volts. Run (plotting the voltage at the top terminal on the right side of the bottom vactrol) for a few seconds, until it's stopped changing. Plot the resistance across the two R terminals of the bottom Vactrol, by plotting the voltage of the top terminal and then, after it's stopped, right-clicking on the voltage's heading above the plot and changing the expression that's plotted by adding /I(I2) after the voltage heading. That should give Ohms on the vetical axis. Trying different control voltages, you should see that the resistance changes perfectly-linearly versus the control voltage, at about a constant 200k Ohms per volt. (Note too that there is a constant 5 microamp current souce needed. I have a simple circuit for that. Also note that I have not built any of this.

That circuit might not be exactly what you're needing but the linearization circuit could be modified for different types of applications.

Regarding the anti-log circuit you posted. It looks a bit cantankerous. I have played with analog multiplier circuits and they can be a bit difficult, in spice. They use very similar types of circuits.

I would try the "Exponential output" circuit, near the botom of the page at

Operational amplifier applications - Wikipedia, the free encyclopedia .

It's just a single diode with one opamp and one resistor. You should be able to add an opamp or two and maybe a voltage or current source and scale the output to be where you need it.
  Reply With Quote
Old 4th September 2011, 08:41 PM   #8
Dr_EM is offline Dr_EM  United Kingdom
diyAudio Member
 
Dr_EM's Avatar
 
Join Date: Oct 2006
Location: Swindon
Thanks for your help on this. Annoyingly, I had to get this project moving along as I'm soon going back to Uni where I won't be able to work on this. As such I preceeded with the design as feedforward/non-linearised. I found that actually, despite the non-linearity of the cells, that distortion wouldn't manifest provided the control circuit was slowed down slightly as you would typically do in a compressor.

Here's the finished article, thought it may be of some interest!

Click the image to open in full size.

Click the image to open in full size.


On the speed dial I included a 'natural' setting, which means the control circuit is not slowed at all. This can be useful for some things but you will hear distortion with certain material on this setting. The switch has 12th, 3rd or lim settings, which are the corresponding attack times (ie, in 3rd with the speed set for 30ms, the attack is 10ms and release 30ms). Lim (limiter) is 'instant' attack.

I should have a demo video up soon so it can be heard
Attached Images
File Type: jpg Three quarter shot.jpg (133.1 KB, 80 views)
File Type: jpg Front shot.jpg (129.7 KB, 8 views)
File Type: jpg Inside top.jpg (203.7 KB, 80 views)
File Type: jpg Inside angled.jpg (110.3 KB, 8 views)
  Reply With Quote
Old 8th September 2011, 01:23 PM   #9
Dr_EM is offline Dr_EM  United Kingdom
diyAudio Member
 
Dr_EM's Avatar
 
Join Date: Oct 2006
Location: Swindon
A quick demo of it with drums. Will try to get hold of some vocals so you can hear that is actually quite smooth and transparent when you want it to be.

http://www.youtube.com/watch?v=H2korClLcTc

Better in 480 or HD
  Reply With Quote

Reply


Hide this!Advertise here!
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
line to optical ---> optical to analog dirtbiker1824 Digital Line Level 5 27th February 2011 03:29 AM
Basic op amp optical compressor questions LarsXI Solid State 0 1st July 2008 11:32 PM
Applying piano black finish help Toast_Master Subwoofers 15 28th May 2006 06:48 AM
Applying T-net to Bridge TwoSpoons Chip Amps 3 9th December 2004 02:20 PM
Help required regarding optical motional feedback theories eclipse Multi-Way 27 6th April 2004 03:03 PM


New To Site? Need Help?

All times are GMT. The time now is 05:51 AM.


vBulletin Optimisation provided by vB Optimise (Pro) - vBulletin Mods & Addons Copyright © 2014 DragonByte Technologies Ltd.
Copyright 1999-2014 diyAudio

Content Relevant URLs by vBSEO 3.3.2