Welcome
Username or Email:

Password:


Missing Code




[ ]
[ ]
Online
  • Guests: 12
  • Members: 0
  • Newest Member: omjtest
  • Most ever online: 396
    Guests: 396, Members: 0 on 12 Jan : 12:51
Members Birthdays:
All today's birthdays', congrats!
ramses (16)
Arcstarter (31)
Zak (15)


Next birthdays
05/12 Colin 99 (53)
05/14 hvguy (41)
05/14 thehappyelectron (14)
Contact
If you need assistance, please send an email to forum at 4hv dot org. To ensure your email is not marked as spam, please include the phrase "4hv help" in the subject line. You can also find assistance via IRC, at irc.shadowworld.net, room #hvcomm.
Support 4hv.org!
Donate:
4hv.org is hosted on a dedicated server. Unfortunately, this server costs and we rely on the help of site members to keep 4hv.org running. Please consider donating. We will place your name on the thanks list and you'll be helping to keep 4hv.org alive and free for everyone. Members whose names appear in red bold have donated recently. Green bold denotes those who have recently donated to keep the server carbon neutral.


Special Thanks To:
  • Aaron Holmes
  • Aaron Wheeler
  • Adam Horden
  • Alan Scrimgeour
  • Andre
  • Andrew Haynes
  • Anonymous000
  • asabase
  • Austin Weil
  • barney
  • Barry
  • Bert Hickman
  • Bill Kukowski
  • Blitzorn
  • Brandon Paradelas
  • Bruce Bowling
  • BubeeMike
  • Byong Park
  • Cesiumsponge
  • Chris F.
  • Chris Hooper
  • Corey Worthington
  • Derek Woodroffe
  • Dalus
  • Dan Strother
  • Daniel Davis
  • Daniel Uhrenholt
  • datasheetarchive
  • Dave Billington
  • Dave Marshall
  • David F.
  • Dennis Rogers
  • drelectrix
  • Dr. John Gudenas
  • Dr. Spark
  • E.TexasTesla
  • eastvoltresearch
  • Eirik Taylor
  • Erik Dyakov
  • Erlend^SE
  • Finn Hammer
  • Firebug24k
  • GalliumMan
  • Gary Peterson
  • George Slade
  • GhostNull
  • Gordon Mcknight
  • Graham Armitage
  • Grant
  • GreySoul
  • Henry H
  • IamSmooth
  • In memory of Leo Powning
  • Jacob Cash
  • James Howells
  • James Pawson
  • Jeff Greenfield
  • Jeff Thomas
  • Jesse Frost
  • Jim Mitchell
  • jlr134
  • Joe Mastroianni
  • John Forcina
  • John Oberg
  • John Willcutt
  • Jon Newcomb
  • klugesmith
  • Leslie Wright
  • Lutz Hoffman
  • Mads Barnkob
  • Martin King
  • Mats Karlsson
  • Matt Gibson
  • Matthew Guidry
  • mbd
  • Michael D'Angelo
  • Mikkel
  • mileswaldron
  • mister_rf
  • Neil Foster
  • Nick de Smith
  • Nick Soroka
  • nicklenorp
  • Nik
  • Norman Stanley
  • Patrick Coleman
  • Paul Brodie
  • Paul Jordan
  • Paul Montgomery
  • Ped
  • Peter Krogen
  • Peter Terren
  • PhilGood
  • Richard Feldman
  • Robert Bush
  • Royce Bailey
  • Scott Fusare
  • Scott Newman
  • smiffy
  • Stella
  • Steven Busic
  • Steve Conner
  • Steve Jones
  • Steve Ward
  • Sulaiman
  • Thomas Coyle
  • Thomas A. Wallace
  • Thomas W
  • Timo
  • Torch
  • Ulf Jonsson
  • vasil
  • Vaxian
  • vladi mazzilli
  • wastehl
  • Weston
  • William Kim
  • William N.
  • William Stehl
  • Wesley Venis
The aforementioned have contributed financially to the continuing triumph of 4hv.org. They are deserving of my most heartfelt thanks.
Forums
4hv.org :: Forums :: Computer Science
« Previous topic | Next topic »   

Question regarding DSP Theory

Move Thread LAN_403
Andy
Wed Sept 18 2013, 07:11PM
Andy Registered Member #4266 Joined: Fri Dec 16 2011, 03:15AM
Location:
Posts: 874
Hi Linas

You could try this code

for(i=0;i<0xff;i++) {
for(j=0;j<0x16;j++) {
temp = v1|v2
temp1 = v1&temp
temp5 = v2&temp
temp6 = temp5|temp1;
temp2 = i^temp6
temp4=temp2+temp4;
}
temp3 = 0xfff-temp4
count = temp3+count
printf(%4X,temp3)

}

printf("% 4X,count) , this value you use


It should find the differential of the noise and give a lineal response works on sha1 the avalanche factor was 1.64, the code might be abit wrong, can't remember how I did it last time,but say you have 0x41 = 01000001 that gets changed into 10111110, and then xored .If you reads 16 points then do that with each character, which then cycles throughout 0xff range, if you print out the character in C you should see a slope or hill.
Back to top
Steve Conner
Wed Sept 18 2013, 08:52PM
Steve Conner Registered Member #30 Joined: Fri Feb 03 2006, 10:52AM
Location: Glasgow, Scotland
Posts: 6706
I tried running this code on my Raspberry Pi and it turned into a strawberry tart. :(
Back to top
Andy
Wed Sept 18 2013, 09:37PM
Andy Registered Member #4266 Joined: Fri Dec 16 2011, 03:15AM
Location:
Posts: 874
I tried running this code on my Raspberry Pi and it turned into a strawberry tart. :(
What???
Back to top
WaveRider
Thu Sept 19 2013, 09:08AM
WaveRider Registered Member #29 Joined: Fri Feb 03 2006, 09:00AM
Location: Hasselt, Belgium
Posts: 500
Linas,
Maybe posting a block diagram of your system would help us understand what exactly you are trying to do. I see your problem as an acquisition/tracking problem that should be straightforward to solve, but unfortunately your description is somewhat confusing (to me at least).
Back to top
Steve Conner
Thu Sept 19 2013, 10:09AM
Steve Conner Registered Member #30 Joined: Fri Feb 03 2006, 10:52AM
Location: Glasgow, Scotland
Posts: 6706
Andy wrote ...

I tried running this code on my Raspberry Pi and it turned into a strawberry tart. :(
What???

Even if this code does calculate the avalanche factor of sha1, I can't see how that is the slightest bit relevant to Linas' problem. :(
Back to top
Andy
Thu Sept 19 2013, 07:16PM
Andy Registered Member #4266 Joined: Fri Dec 16 2011, 03:15AM
Location:
Posts: 874
Even if this code does calculate the avalanche factor of sha1, I can't see how that is the slightest bit relevant to Linas' problem. :(


Question, can i do something to make oscillator act as linear system, by doing deconvolution or other DSP magic, so even if oscillator has nonlinear response, i can correct my feedback voltage by knowing all phase correction values in past so it will act as linear ?
Oscillator is Laser. It has random noise

Running the code over a sine wave, would give a linear step, I just saw nonlinear to linear, about what it did, sha is meant to be random, and by design nonlinear between each proceeding character, if you imputed AAAA*4,/BBBB*4/CCCC*4 the output feed into the code, would give a linear number from a to b to c
Back to top
Linas
Thu Oct 17 2013, 08:55AM
Linas Registered Member #1143 Joined: Sun Nov 25 2007, 04:55PM
Location: Vilnius, Lithuania
Posts: 721
Is what i figure out.
I need to generate feedback, with well defined spectral components ( like one period of cosinus, simple counting up, counting up and down, window (aka delta with width), and so on.) .At the same time measure response. When i get response, i will make FFT of input signal (In(x), and output signal (H(x)), .
and because H(x)=In(x)*Foscillator(x) is in frequency domain, i simply get Foscillator =H(X)/In(x)

But because i have noise, and at the same time i have active oscillator stabilization circuit, what i would get is combination of two functions.

But if i run this algorithm only for my oscillator with no stabilization, it is possible that while i am changing phase with feedback, phase can go off my measuring window, since phase can goo anywhere from +-128pi, and FFT method can only calculate phase in +-pi limit. Of course oscillator phase will run out of my measuring windows quite slow ( i can get 2-20 measurements while phase is still in my measuring window, but it is a bit unpredictable frown
Back to top
BigBad
Thu Oct 17 2013, 03:17PM
BigBad Registered Member #2529 Joined: Thu Dec 10 2009, 02:43AM
Location:
Posts: 600
Maybe you should ditch the FFT stuff and do optimal filtering to do peak edge finding and then use that to calculate the phase and use that to feedback. That way you won't necessarily have to wait for a whole cycle and you won't have the windowing issues that FFT give you (or at least not the same).

The trick with optimal filtering is that the parts of the signal where it changes most quickly need greater weighting.

Also as Steve says, characterising or understanding the nonlinearity in the system seems to be a top priority, unless you know how much pull you get for how much voltage input, you're never going to get it stable.
Back to top
Linas
Thu Oct 17 2013, 04:40PM
Linas Registered Member #1143 Joined: Sun Nov 25 2007, 04:55PM
Location: Vilnius, Lithuania
Posts: 721
well, not FFT, but to be more precise DFT fo single poiny. My new dsp processor can do 1.8MHz loop, while i only need 250KHz (without I/O, it will be slower)

Also i am writing code for DFT inside acquisition fpga, i bet i can make it work by using Signed integer table of coefficients, and only thing that itself is do MAC with 16b of data from detector (detector eads spectrum of laser, and phase is inbeded in that sygnal)
Back to top

Moderator(s): Chris Russell, Noelle, Alex, Tesladownunder, Dave Marshall, Dave Billington, Bjørn, Steve Conner, Wolfram, Kizmo, Mads Barnkob

Go to:

Powered by e107 Forum System
 
Legal Information
This site is powered by e107, which is released under the GNU GPL License. All work on this site, except where otherwise noted, is licensed under a Creative Commons Attribution-ShareAlike 2.5 License. By submitting any information to this site, you agree that anything submitted will be so licensed. Please read our Disclaimer and Policies page for information on your rights and responsibilities regarding this site.