Monday, May 23, 2016

AudioCardDSP - Oscilloscope & Spectrogram (a Star Trek intro)

If you think you've seen it all in VB6, I will show you a project close to perfection (is an act of genius actually):

(Mirror 2) Download the VB6 source code from PSC

FRANCO LANGUASCO made the software, he is a top programmer and scientist. One of those programmers that give pride to our community !






Calibration coefficients of KCal
Generic calibration:
• Apply the input (Line In or Microphone) a sinusoidal signal of 1 kHz, of known amplitude (but always within the limits allowed by your sound card) and begin measuring.
• Adjust, at different sampling rates, the calibration coefficients for the 'trace amplitude and / or the desired line.
This will make it possible to, eg, calibrate the 'output of a transducer in the' desired engineering units: an accelerometer with 312 mV / g sensitivity can give, with proper adjustment of the KCal coefficient, direct readings in g / Div (set to " g "with the relevant measurement unit).
The KCal coefficients can also be negative, if it is desirable to invert the input signals.
preferential calibration:
• Apply 'entrance LineIn a 1 kHz sine wave with an amplitude of 2 V peak-to-peak (0.707 Vrms measured with true rms voltmeter) and initiate measures
• Carry out, on 'oscilloscope settings:
• Ch1, Ch2 0.2 I / Div, Pos = 0.
• P. = Not selected.
• Time Base = 0.001 s / Div
• X-Y = unchecked
• Trigger mode = Auto
• Intensity = 1
• Average = selected
• No. of sweeps = 100
• Adjust, at different sampling rates, the calibration coefficients to have tracks that cover exactly the 'entire vertical amplitude of the lattice. Press the [Apply] button, after each change of values, in order to assess the 'effect of the change.
• With this calibration and signals applied to 'LineIn entrance, the stairs of the instruments will be calibrated in Volts and will be well calibrated values ​​in dBu, dBV and dBm of' spectrum analyzer.
• With the [Find], after applying to both LineIn inputs the same 1 kHz sine wave with an amplitude of 2 V peak-to-peak (0.707 Vrms measured with true rms voltmeter) is calculated at a rate of currently selected sampling, a value KCal normally more than sufficient for this application. Correct, where appropriate, the value found to obtain the desired accuracy. Use, for this function, a very accurate signal frequency (1 kHz), e.g. that generated by siggen program.
The calculated value is related to # 1 (left channel); the gain relationship between the two channels of the sound card, value that in the ideal case should be equal to one, is reported as help text (tooltip) in box KCal currently active.
Nothing forbids, of course, to apply to a 1 kHz signal inputs with any amplitude (but always within the limits allowed by the audio card): you will have, in this way, the matching of the 'scale units of the instruments with the' amplitude of the signal applied (see above, the 'example of' accelerometer).
And 'possible, from Ver. 2.7, explicitly declare the preferred units for each of the two input channels, units that will be given on the charts scales.
The [Apply] button using the coefficients set only in the current measurement session; [OK] button using the coefficients set in the current session and saves them in the INI file to be used in future sessions.




Multiplexer compensation


MUX clearing procedure:
• Apply to both LineIn inputs the same sinusoidal signal of 1 kHz, 2-V peak-to-peak (0.707 Vrms measured with true rms voltmeter) and begin measuring.

• Carry out, on 'oscilloscope settings:
• Ch1, Ch2 0.2 I / Div, Pos = 0.
• P. = Not selected.
• Time Base = 0.001 s / Div
• X-Y = selected
• Trigger mode = Auto
• Intensity = 1
• Average = selected
• No. of sweeps = 100

• Adjust the coefficient of MUX compensation so that the screen is drawn only one segment. The design of an ellipse indicates a residual phase error.
Press the [Apply] button, after each change of values, in order to assess the 'effect of change

With the [Find] is calculated by a compensation value usually more than enough for this application. Correct, where appropriate, the value found to obtain the desired accuracy. Use, for this function, a very accurate signal frequency (1 kHz), e.g. that generated by siggen program.
The V2 / V1 value, calculated together with CompMUX, is the gain ratio between the two channels of the sound card, value that in the ideal case should be equal to one.

I can not exclude that for some sound card models the coefficient is useless (Cm = 0 s) or should even be negative.

The [Apply] button using the coefficient calculated only in the current measurement session; [OK] button, use the coefficient in the current session and saves it in the INI file to be used in future sessions.





Complete instructions for AudioCardDSP are not yet available.

'S use of the instruments refer to any text of electronic measures.
To make the most of the possibilities offered by this program read (and possibly print) the following notes.

Content:
• General notes.
• Notes for the 'signal acquisition.
• Notes to 'use of' spectrum analyzer.
• Notes to 'use of' oscilloscope.
• Notes to 'use the "Frequency Transfer Function Curve Fitter".
Technical information.
• Warnings.
• Instruments used for development and calibration.
Bibliography.

--------- --------- OOOO

General notes.
• To avoid damaging the sound card, DO NOT exceed the value of 5 to 10 mV peak to peak to 'microphone input and a 3 V peak-to-peak to' Line In input, paying particular attention to the potential mass.
To measure voltages above the value of the above, use a resistive divider (possibly offset).

• press the button In many toolboxes setting values ​​can be written / edited directly: in this case, if the box were to take yellow, confirm the new value with the Enter key (and only then, when needed, [ apply]).
Direct editing of the values ​​only serves to spigots purposes: normally only need to use darts upward / down to change the values ​​in preset sequences.

• With the commands [F ‡] of 'Spectrum Analyzer and' Oscilloscope can automatically find gain values, attenuation, etc ... suitable for immediate display of the test signals can then follow other changes of scale more suited to a safe quantification of values ​​involved.

• Many boxes have as help text (ToolTipText) a value related to the main one: e.g. box [Time Base] of 'oscilloscope has, like help text, the frequency value corresponding to the period of a horizontal division.

• Some boxes (e.g., values ​​of Trigger Holdoff, Alfa medium exponential, etc ...) are set to zero with a double "click" on them.

• The measurement cursors can be moved with the left mouse button pressed on the instrument screen, above and to the right of the lattice; the labels of the sliders can be moved with the left mouse button pressed on them.

• If you press the right mouse button on the tool screen, where it appears the 'Menu icon, you can directly access the related File menu options.

• The title of the tools (red writing at the top on the screen) is "default", the name of the sound card and the input channel selected and can be changed with the menu item [File], [Change Title]; to completely eliminate the title only insert a space in the [New Title?].

• The measurement configurations of 'Ananalizzatore Spectrum and' Oscilloscope can be saved for later use, with its menu items [File]; the measurement configurations can only be called to capture still and / or instrument off.

• By checking the box [Start with last configuration] in the Form [Preferences], paintings [A. Spectrum] and / or [Oscilloscope], tools recall the 'last set span configuration and restarts with this at each restart.

• With the menu item [File], [xxx Copy to clipboard] images of the screens and tools can be copied to the clipboard ( "Clipboard") to then be inserted into any graphics application (e.g., Windows Paint).
Likewise, tools and screens can be printed with its items of [File], [Print].


Notes for the 'acquisition of the signals.
• With the boxes of the framework [acquisition Lines] you can choose the source of the signal to be analyzed: Line In and microphone allow you to analyze signals coming from 'outside; Wave and CD allow the 'analysis of the sounds generated internally by the PC.
The available channels are, however, dipendendenti the selected sound card and must be enabled by the "Recording Panel" system, preferably with the cursor in volume to maximum and the balance slider in the middle (see Technical Information Section of the calibration).
The volume of the various channels (if available) can be controlled only by the "Recording Panel" Window, simply "clicking" with the right mouse button on that channel and then adjusting the 'slider.

• The overview [Tools], the 'spectrum analyzer and the' scope can be switched on / off independently, even during measurements.

• The virtual tools of this application, unlike many other "colleagues" virtual (and also by some tool in "flesh"), have been designed to work in real time, i.e. to process ALL the samples that your sound card is able to acquire: this requires, of course, a considerable computing power used by the PC (and a video card not particularly slow). I have, therefore, entered the [Proc t] box to show the average time (in ms and calculated as moving average [N ° buffers] events) used by the tools to process the signal and to draw graphs: it turns red if the average time is greater than the maximum allowed by the buffers in use, resulting in loss of part of the signal.
In this case, to continue to work in real time, try to:
• deactivate the tools (and measurement options) unnecessary.
• decrease the sampling frequency to the minimum required by the current measurement.
• Increase the Number of buffers.
• use if possible, the [HOLDOFF] of 'oscilloscope to reduce the processing load due to the design of the tracks; also decrease to a minimum the 'intensity of tracks can be of considerable help.

The box [Ib:] indicates the 'buffer index currently sent to' s analysis tools. Under the box [Ib:], if there are buffers in queue, waiting to be sent to the tools, a box appears, (yellow if the N ° of buffers in the queue is less than the N ° of available buffers, otherwise red), showing the number of buffers waiting.

• "Click" with the right mouse button, the enable box of 'oscilloscope turns off / on a bar graph meter of the input signal level. This type of instrument, which I consider pretty useless, I was asked by several users of this program and the 'I have therefore included (while keeping it fairly sheltered ...) in version 2.7.2 and following.


Notes to 'use of' spectrum analyzer.
• The [Trigger] box, when "clicked", then switches the trigger on a positive note -> Off -> negative edge -> Off -> ...

• The [|>] Display the picture shows / hides a window with the currently analyzed signal: this is useful to adjust, in the case of complex signals, the trigger level that controls the 'beginning of the signal part to be analyzed; The trigger level can also be set directly in this window, moving (with the left mouse button pressed to the left of the grid) the position of the line (or arrow) horizontal blue.
To avoid useless consumption of computing resources and graphics, turn off the signal viewer as soon as possible.
"Clicking" with the right mouse button, the [|>] shows the signal window to the original position (if it has been moved to no longer accessible location).

Note: If the [Window] is on, the graph shows the actually analyzed by the FFT signal (and then modified in amplitude from Window profile) while the trigger is searched on "windowing" signal before the 'operation.

• E 'possible, from Vers. 2.7 and at the expense of a greater processing load, simultaneously analyze two signals by selecting the [two spectra] Calculation in Form [Preferences] framework [A. spectrum] and enabling thus the Power Syy functions, Power Sxy, Ht (f) and Coherence function under [Display].

The first signal (hereinafter referred to as x) is the combination of # 1 (left channel) sound card with the # 2 (right) channel, as selected in the ComboBox [Source] of the [Main Input mode] framework; the second signal (hereinafter referred to as y) is always channel # 2 (right) of the sound card.
In practical applications of the functions of two signals (Power Sxy, Ht (f) and Coherence function), selecting [Source] will always Ch1.
The trigger is always sought on the x signal.
L 'eventual Window selected is applied, in the same way, for both signals.

The functions, currently available, which would require the calculation of the two signals are:
• Power Syy: auto power spectrum of the signal y.
• Power Sxy: x mutual power spectrum of the signal with the signal y.
• Ht (f): the system of frequency response function having as input the signal x and the signal y as output. Note that the 'y output of the system is loaded from' impedance 'input of your sound card.
• Coherence function: coherence of the x signal with the signal y.
Small note, surely superfluous: the measure of consistency makes sense only if you enable media options on multiple spectra.

• The 'Spectrum Analyzer (from Ver. 2.7) can also be used as a sound level meter (on the field of selected frequencies), provided that the microphone and the sound card used are of sufficient quality to ensure a "flat" frequency response.
To enable this feature, proceed as follows:
• select the 'input [microphone] under [acquisition Channels] Form [acquisition] signals.
• select the [Corr. of Sxx with psofometrica] curve in the Form [Preferences] framework [A. Spectrum], [Sound Level].
• choose the desired weighting curve in the ComboBox [weighing Curve type].
• select, under [Main Input mode], ComboBox [Source] of 'spectrum analyzer, signal Ch1, Ch2 or Ch1 + Ch2 (attention: in many sound cards l' from microphone is mono only).
• select, under [Display], the Power Sxx function.
• select, to have readings in dB (A | B | C | D), to a logarithmic magnitude scale in the ComboBox [Scale].
• make sure that the window function is not selected, and that the percentage of Overlap is set to zero.
• the measurement time can be selected by setting the value of [N. Samples] under [Main Input mode] (see the ToolTip associated presenting, in seconds, the measurement time).
• l 'intensity of the sound on the selected frequency range, it is displayed in the upper, right corner of the lattice (top, left to the 3D spectrogram).
• The box [Coeff. Calibration] Form [Preferences] framework [A. Spectrum], calibrates this for direct comparison instrument with a sound level meter calibrated.

• From Ver. 3.0.0 is possible to calculate the Cepstrum (transformed logarithm of the amplitude spectrum) of the spectra displayed on the instrument screen.
To use this feature you must select the check box [Cepstrum] Calculation in Form [Preferences] framework [A. Spectrum], [Calculation options].
From the calculation of the Cepstrum it is also derived the "Fundamental Frequency Estimation".

• The screen of this tool has, in the upper right, a colored dot that turns red if the spectrum processing time (FFT, medium, graphic etc ...) has exceeded the maximum allowed by the buffers in use: in this case l 'analysis must jump over the hole that has formed in the incoming data stream, resulting in the loss of part of the signal (caution: when this occurs, the measurements with percentage of "Overlap" greater than zero may be incorrect).

• The [P.], The framework [Plot], enables the way to "infinite persistence of vision" that lets you superimpose on the screen all the ghosts away, away elaborated: it is possible, in this way, evaluate changes due to noise, the instantaneous frequency deviations and amplitude, etc ...
"Clicking" with the right mouse button, this command will eliminate the accumulated spectra and you start overlapping.

• The [F ‡] cadres [Ref. level] and [Attenuation], if you "click" with the left button, vertically centers the chart (spectra, Ht (f) and consistency) so that it is completely contained within 'inside of the lattice.

• The frequency range (FMin -> FMax) displayed on the screen can be moved, within the permissible limits and keeping the initial window, with the cursor [Center Freq.] Or by pressing the left mouse button on the chart, and then moving it.
The command [Find peak] of the framework [Freq. range] shifts the frequency range (FMin -> FMax) so that you receive the highest spectrum value on the screen.

• The right mouse button pressed on the graph of the spectra, makes up the zoom window which can then be sized at will: the button is released a pop-up menu to match the scale of the graph with those of the window selected or to cancel 'operation began zooming.

• The level of 0 dB is arbitrarily placed at the linear level 1 There | Wi. If the calibration (see Calibrazione_KCal.rtf file) was made in the manner indicated as preferred, the values ​​will be calibrated in dBu, dBV and dBm.
Nell 'setting of' impedance Z0, for measurements in dBm, account must be taken of 'own input impedance of the sound card.

• The frequency measurement cursors of 'spectrum analyzer are positioned, for consistency of values ​​indicated only at the actually calculated frequencies.

• The viewing angle of the 3D spectrogram can be changed by dragging with the left mouse button pressed, the green + on this' time axis. "Clicking" with the right mouse button, the [-> 3D] shows the 'viewing angle to' preferential setting of 45 °, with the feed pitch and a 5 pixels deviation.
Notes to 'use of' oscilloscope.
• The vertical position of the tracks can be adjusted by changing the value in the box [Pos] or, when they are not active measurement cursors, moving (with the left mouse button pressed to the right of the reticle) of the zero reference position.
• The horizontal trace position can be moved with the arrows / cursor [Hor. Position] or by pressing the left mouse button on the trail and then moving them; the [X May 10] increased by 10 times the width of the tracks.
• The trigger level can be adjusted with the arrow keys up / down [Trig. Level] or, more simply, by moving (with the left mouse button pressed to the left of the grid) the position of the line (or arrow) horizontal blue on the screen.
If the filter on the trigger signal (HF Reject, LF Reject or mobile spectrum), and if this signal is active appears in the track # 3, the blue horizontal line moves to the filtered signal to allow a more obvious use.
• The point of pre-trigger can be changed with the cursor [Pretrigger Pos.] Or moving (with the left mouse button pressed in the lattice) the position of the line (or arrow) vertical blue on the screen.
• E 'possible (from Ver. 2.7.1) to measure the time interval between two successive trigger pulses enabling the box [Size Trigger cycle:] Form [Preferences] framework [Oscilloscope] choosing, well, if you want a frequency display or period.
The signal of the trigger pulses are generated for each passage of the rising edge (or falling) through the selected trigger level and not to track rate.
This allows, with appropriate adjustments, to use the 'scope as a frequency meter (or as period meter) of periodic signals displayed on the screen.
The measure of the trigger cycle is an alternative to the display of the trace current time (written down, under the lattice).
To obtain a meaningful measure of the signal frequency (or period) appears to proceed in the following way:
• adjust the trigger level, preferably in a way [Norm.], Until you get on a stable track screen. So [Sing.] And in [Auto] mode, when the trigger pulses are enabled by 'operator or generated by the internal counter and not from the signal under test, the value of the trigger cycle is written in red to indicate the low reliability of the same. Note: the auto-trigger pulse, if it is not found a normal trigger, are generated at a frequency of 20 Hz.
If signals from the d 'complex waveform appropriately use the options offered by the trigger filter.
• to increase the accuracy and stability of measurement (always within the limits of accuracy of "clock" of the sound card) to enable the box [Average] mediating on a large number of tracks.
• Ensure that the [t Proc], Form [acquisition] signals, is not red: this would mean that not is working in real time instrument (see Notes for the 'acquisition of signals) and that therefore the' Pulse trigger could not be generated at each period of the signal; try, in this case, to put out the tools unnecessary (Spectrum Analyzer, Co, etc ...), to delete unnecessary tracks (basic delayed time, mathematical functions, the trigger signal, etc ...), to decrease the sampling rate, to increase the Number of buffers and to use, whenever possible, the [HOLDOFF] command.
• The [F ‡] of the input channels, if you "click" with the left button, hits the track so that its maximum value coincides with the maximum of the lattice and / or the minimum value coincides with the minimum of the lattice ; if it "click" with the right button, hits the track so that it is exactly between the references for measuring the "rise-time".
• The command [P.], Moves over the square of the input channels, enables the viewing mode to "infinite persistence" that allows to overlay on the screen all the tracks away, away processed: it is possible, in this way, evaluate changes due to noise, the instantaneous amplitude variations, the jitter etc ...
"Clicking" with the right mouse button, this command deletes the accumulated traces and you start overlapping.
• To speed up the design of the tracks, when you exceed a certain value of Champion / Pixel, not all the samples that are shown on the screen: in this case the point at the top right of the screen turns red, indicating that the signal could be displayed affected by the phenomenon of "aliasing" or may be "skipped" transient signal duration of less than Skip samples (see the current value of Skip reported, such as help text, on 'label [s / Div]).
Also the calculation of the derivative and of 'full, in these conditions, will be affected by error because I have chosen to favor the compatibility of the graph of the function with that of the track as drawn, rather than their numerical accuracy. To limit the 'onset of this phenomenon use, possibly, lower sampling rate values ​​when you need high values ​​of [Time Base].
• If the set value of [Time Base] is less than the sampling period his box turns red, warning that the design of the tracks is losing significance.
• The [Roll] button is used to enable the mode of slide show, i.e. as if the tracks were to be drawn on a paper tape that continuously scrolls to the left and is useful to observe, in a continuous way, the 'evolution of signals (normally aperiodic) low frequency (<10 Hz).
"Clicking" with the right mouse button, the [Roll] button pauses the 'advancement of the tracks; "Clicking" a second time, with the right mouse button, the tracks start from scratch.
The [Roll] button is enabled only for the time track (Time basis) greater than or equal to 50 ms / Div; when the display is in "Roll" you can not be selected track time under 50 ms / Div.
The [Roll] button does not appear if the PC used does not allow the 'use of' 'High-Resolution Performance counter ".

To get a slip with minimal stutter I implemented an adaptive feed system and is therefore normal that the [t Proc] box will flash red; This should not, however, affect the accuracy of the observed signal. If the checkbox [t Proc] and / or [Ib] box should remain solid red, resulting in loss of part of the signal, try increasing the "Pass of the tracks" in the Form [Preferences] framework [Oscilloscope].

The best of the track quality is achieved by observing the following precautions:
• turn off all unnecessary tools (e.g., the 'Spectrum Analyzer).
• avoid activating, on the same PC (and unless the CPU used is not of the "multi-core"), applications that periodically require a strong use of computing resources (e.g., the siggen program).
• use low sampling rates, e.g. 8 kHz (higher sample rates would still be unnecessary given the bandwidth of observable signals).
• Reduce to a minimum (see above) the "Pass of the tracks" in the Form [Preferences] framework [Oscilloscope]. The minimum acceptable step depends on the 'current setting of "Time base" and the speed of the CPU and graphics card used.

Note 1: The integral mathematical function (see Math Functions) when enabled in a "Roll", performs a 'seamless integration of the signal flowing on the screen and can therefore easily disappear beyond the upper or lower limits of the screen. I have long been in doubt whether to propose it too but in the end, given its usefulness in many situations (e.g., in the development of control systems), I decided to trust the understanding by the operator 's integration principles.
The integration constant current can, however, be reset at any time "clicking" with the right mouse button on the letter M on the right of the screen above the zero reference of the math function graph. E 'can also restrict the result of the integral function to' internal 'area of ​​the screen by enabling the "Auto limitation of' integral 'box on Form [Preferences] framework [Oscilloscope], [Roll], but be careful: the' use of this option can easily lead to errors in the 'interpretation of the' integral result. L 'car limitation is not applied when the "Roll" is paused or when journals are stored tracks.

Note 2: When in a "Roll" the correlation function is disabled and inactive.

Note 3: l 'use of the "Roll" can be problematic on PCs equipped with CPUs with lower clock frequency to 700 MHz or slightly faster video cards.

• The [Math Functions button] displays / hides the controls to apply some mathematical functions to the calculated signal S (t) which can be track # 1, track # 2 or the sum or the product of the two.
The request function graph is drawn with the track # 3, using the attenuation settings and position of this' last.
The commands of [S (t)], [| S (t) |], [Derivative of S (t)] and [S Integral (t)] are mutually exclusive and are deactivated "clicking" a second time on the command active; the [correlation and statistical functions] opens the window with the calculations of self / mutual correlation and the amplitude probability functions (with a minimum value measurements, maximum and effective) of the signals (tracks) are currently displayed on the screen of ' oscilloscope.

In Form [Preferences] framework [Oscilloscope] you can choose whether the scale for Derivative must be in Vi / s or I / T with T equal to the sampling period (1 / Fs); similarly, for the 'Integral, you can choose a scale in Vi * s or I * T.

"Clicking" with the right mouse button, the [Math Functions] shows the framework of mathematical functions to the original position (if it has been moved into place no longer reachable).

Note 1: When the function | S is active (t) | and S (t) Ch2 or Ch1 * Ch2, the 'reversal of Ch2 channel inverts the result of the function and not the sign of the signal applied to Ch2.

Note 2: The 'reverse channel Ch2 is not applied in the past to signal correlation and statistical functions.

Note 3: L 'search option of the maximum of the correlation function (Check box [Max:] under [Cursors:]) is the maximum of only the function displayed on the screen and not on the whole correlation calculated field: this to make possible a selective search in 'of delays range to consider.

• The track # 3 is used, for now, the "Delayed Time Base", the math function graph and from the filtrate the trigger signal: these last three measurement options are therefore mutually exclusive.
To view and change the attenuation settings and track location # 3 to open the [Tr 3] under the [] button.

• Tracks, currently displayed on the screen, can be saved to file ([File] menu, [Save Tracks]) in order to be subsequently reviewed or used in other applications.
two formats are provided:
• the .dso format saves the tracks with all the information needed to 'any, subsequent call (with [File] menu, [Read Trace]) on dell' oscilloscope screen.
• .txt format saves the traces in text mode, might want to be used in other applications (e.g., Excel).
The output file format is:

 Measure title

 Date of measurement
 Now the measure

 t (0) V1 (0) V2 (0)
 .... ..... .....
 t (i) V1 (i) V2 (s)
 .... ..... .....
 t (n) V1 (n), V2 (n)

with t (s), V1 (s), V2 (s) respectively equal to the time value of the track # 1, track # 2 value of the i-th sample; the values ​​V1 (i) and V2 (i) are those, whole, read from the ADC converter of the sound card and not modified by the coefficient Kcal.

Notes to 'use of "Frequency Transfer Function Curve Fitter".
• E 'possible (from Ver. 2.8.0) to enable a search function of the zeros and poles of the frequency response functions, Ht (f), measured with the' Spectrum Analyzer.
The technique (MDOF) used for the estimation of the transfer function parameters is to interpolate, minimizing the 'error resulting mean square error, the' Ht (f) date with a rational function of two polynomials, Ht (p), with coefficients real.
Are, for now, only the estimated coefficients of the polynomial in the numerator / denominator, the gain and the poles and zeros calculated as roots (complex) of these two polynomials expressed in normal form.
For a good use of this search tool is required, however minimal, knowledge of the theory of transfer functions and network functions.
• The search tool can be activated from the menu item [Tools], [Ht (f) Fitter] or by 'Spectrum Analyzer with [Ht button (f) Fitter] which is enabled under [Storage] when it has been called a frequency previously measured response function and stored in one of 10 memory locations, and has been chosen the 'Ht display option (f) under [display:].
• When the instrument is called up from the [Tools], can be read and analyzed .HtF files previously saved by 'Spectrum Analyzer or compatible files, like those .ZxM VectImp saved with the instrument (for analysis of network functions). In this case the frequency range used for the 'analysis is all defined in the file (see, below, the format of files).
• When the instrument is called up with the [Ht (f) Fitter], the frequency range used for the 'analysis is currently selected on the screen. And 'convenient, in this case, and to minimize the' effect of noise, send to 'Ht analysis (f) averaged over several measurements. Tip: check, if necessary, the 'measurement reliability with the coherence function.
• Before proceeding with the 'analysis, button [Calc Norm. Poly], we need to define approximate degree polynomials that interpoleranno the functions Ht (f) or Zx (f).
• If you set the degrees of polynomials are not sufficient to define the zeros and the poles present in the 'Ht (f) displayed on the screen, the interpolating curve calculated and displayed (in magnitude and phase) will deviate from the one required: to increase, in this case, the grades of interpolating polynomials to obtain a good match curve (and a small RMS value Err).
• If, on the contrary, the degrees are set too high the correspondence of the curves will in general very good but will be calculated zeros and poles in excess: in this case, go to the table [Zeros / Poles], tick zeros and poles successively (first those written in red), synthesize the curve corresponding to the ones left with the [Syntethize with selected roots], observe the resulting curve and consider how valid the zeros and poles sufficient to provide the desired degree of interpolation.
Note 1: For an easier evaluation of the synthesized curve, the value of Kg (gain of the transfer function expressed in normal form) is calculated so as to minimize the 'square error between the dell' Ht module (f) date and that of 'Ht (p) interpolated (calculated  = 0).
Note 2: are arbitrarily considered not significant (and written in red) zeros and poles with natural frequency of greater  resonance Fs / 2.
• With the menu item [File], [Save Kg, coefficients, zeros and poles] can be saved to file, in .txt format, all relevant parameters of 'Ht (p) interpolating.
Note: the coefficients of the polynomials saved are those of the transfer expressed in normal form function, i.e. with the coefficients of the highest degree reduced to 'drive and collected in Kg.
• The format of files Ht (f) (.HtF and .ZxM) accepted (and generated) by this tool is:
fs
Fr (1), HtRe (1), HtIm (1)
..... ....... .......
Fr (s), HtRe (s), HtIm (s)
..... ....... .......
Fr (n), HtRe (n), HtIm (n)
Fs equal to the sampling frequency used to generate the 'Ht (f) and Fr (s), HtRe (s), HtIm (s) respectively equal in frequency, real part, imaginary part of the i-th dell' Ht sample ( f) under examination.

Technical information.
• The input channels are calibrated (using the multiplication coefficient KCal) to have a 'height of track 1 will in correspondence of a sinusoidal signal of 1 V peak-to-peak and a 1 kHz applied to' Line In input of the sound card; the cursor to the Line In volume, the Recording Panel, must be maximum and the balance slider in the middle. Other sound card models, different from my Sound Blaster Live !, may require different calibration coefficients and also to reduce the volume value to avoid the saturation of the Line In channel (as occurs, e.g., for Realtek HD Audio Input).
The calibration coefficients also depend on the sampling frequency of the sound card and are experimentally found with the 'help of a generator of Exact signals 126, 468 of a Tektronix oscilloscope and a multimeter Tektronix TX1.

From Vers. 2.1 onwards, the calibration coefficients can be changed with the Form [calibration coefficients], which provides sample rates of 8000, 11025, 16000, 22050, 24000, 32000, 44100 and 48000 Hz. For frequencies not provided and minors of 48000 Hz is used the KCal of 11025 Hz; for depths greater than 48000 Hz it is used the KCal of 48000 Hz.

By Ver. 2.7.1 is possible, with the [Find] Form [calibration coefficients], automatically calculate a value of KCal normally more than enough for this application (see, with the [Help] button, the file instructions Calibrazione_KCal.rtf).

And 'possible, from Vers. 2.7, explicitly declare the preferred units for each of the two input channels, units that will be given on the charts scales.

• With sound card SB Live! the -3 dB passband goes from 7 Hz to 21 kHz; the input voltages in the linear region, they are 3 V peak-to-peak for the 'Line In input and 3 mV peak to peak for the' microphone input.

• With SB Live sound card !, the channel sampled signal # 2 (right) is delayed by about 1/48000 s compared to # 1 (left channel): evidently it is used only one A / D converter, alternately switched on the two channels. This is felt on the trail with only very small values ​​of Time Base or the display to X-Y.
This phenomenon, from Vers. 2.4 onwards, it is offset by the 'use of CompMUX coefficient, editable in the recalled table from [Calibration] menu (I had to do it because, having added the X-Y mode, the' phase error were unacceptable).

L 'introduces a distortion compensation operation (mild but measurable) on the signal of the channel # 1, and then, for accurate measurements and / or when the phase shift between the two channels is of secondary importance, is the coefficient CompMux recommended to set to zero.
The delay, however, does not occur by acquiring the signals from the wave channel: in this case, set to zero the coefficient CompMUX.

From Vers. 2.6 is possible, with the [Find] Form [calibration coefficients], automatically calculate a compensation value usually more than enough for this application (see, with the [?] Button, the instructions of Compensazione_MUX file. RTF).
The V2 / V1 value, calculated together with CompMUX, is the gain ratio between the two channels of the sound card, value that in the ideal case should be equal to one.

• Some audio cards come at very high Fs sampling rates (up to 192 kHz) and this application tools allow you to use them.
Caution, however: the 'effective bandwidth does not increase, generally, up to about Fs / 2, but is almost always limited, internally to the sound card, by a low-pass filter (with Ft of about 20 kHz).

• The resolution used for the A / D converter of the sound card is 16 bits per sample: this resolution is more than sufficient for almost all of practicable measures, especially when you consider that the best oscilloscopes commercially (Tektronix, HP, etc. ..) use converters to 8 or 12 bits per sample.
With the 'spectrum analyzer this resolution allows a dynamic of 90 dB.


Warnings.
• This project was developed using the "." as the decimal separator; although he tried to prevent possible problems due to 'use of "," I can not exclude that it remained some inconsistency.
In particular, could be a source of trouble reading, from AudioCardDSP.ini files (especially with Windows XP!), The calibration parameters (see the values ​​assigned in LeggiParametri routine and subsequently observed with Form recalled from the [Calibration]).
In case of malfunction due to this problem, try changing the regional settings on your PC and give me news of the "bugs" found.

• For convenient use of the tools of this project is advisable to have a screen resolution of at least 1024 x 768 pixels.
For best use of the Oscilloscope tool is advisable 'use of CPU Pentium III 500 MHz or higher.

• Do not force (eg with Task Manager), and especially in the IDE, the 'arrest of this program when it is active l' acquisition of signals: the connection to the sound card would remain open, preventing any subsequent restarts, and compelling to a "shut-down" and "restart" of the system.
Always use, before closing, the [Stop] button on the Form acquires signals.

• This version can not work for more than (about) 13 hours continuous.

Instrumentation used for development and calibration.
• Digital Storage Oscilloscope, Tektronix 468.
• VCF / Sweep Generator, Exact 126.
• True RMS Multimeter, Tektronix TX1.
• Digital Wave Form Generator for Sound Cards, siggen 3.1 F. Languasco.


Bibliography.
• Theory and Application of Digital Signal Processing - L. Rabiner, B. Gold - Prentice-Hall Inc.
• Digital Signal Processing - W. Stanley - Reston Publishing Company Inc.
• Digital Filters and Their Applications - V. Cappellini, A. G. Constantinides, P. Emiliani - Academic Press.
• Digital Time Series Analysis - R. Otnes, L. Enochson - John Wiley & Sons.
• Numerical Recipes in FORTRAN 77 - William H. Press.
• Oscilloscope Trigger Circuits - H. Magee - Tektronix Circuit Concepts.
• Sweep Generator Circuits - K. A. Kinman - Tektronix Circuit Concepts.
• The Fundamentals of Signal Analysis - Hewlett Packard, Application Note 243.
• Control System Development Using Dynamic Signal Analyzers - Hewlett Packard, Application Notes 243-2.
• The Fundamentals of Modal Testing - Hewlett Packard, Application Notes 243-3.
• 468 Tektronix Digital Storage Oscilloscope, Operators Instruction Manual.
• Agilent 6000 Series Oscilloscope, Users's Guide.
• Electronic Measurements - Notes from the Turin Polytechnic courses.
• Theory of electric networks - Notes from the Politecnico di Torino Courses - CLUT Publishing.



Trigger preferences

on the trigger signal filter:
When they used various trigger filters and especially with the mobile spectrum, it is very convenient to use the track # 3 ([-> Tr3] button under [Ch Source:] of 'oscilloscope) in order to see the' actual signal used in synchronization.

The [Apply] button using the coefficients set only in the current measurement session; [OK] button using the coefficients set in the current session and saves them in the INI file to be used in future sessions.


• Low-pass: allowing the trigger synchronization component low-frequency signal (HF reject).

• High-pass: allowing the trigger synchronization high-frequency component of the signal (LF reject).

• Mobile Spectrum: enables synchronization of the trigger on the appearance (or disappearance) of a certain frequency in the signal under test, e.g. in 'analysis of tonal sequences (selective).
With the delay value you can adjust the filter selectivity: more delays correspond to greater selectivity but major delays in the filter response. As a guide, use a delay of at least 10 periods of the frequency to be synchronized.

• Filter type (only for Low Pass and High Pass):
• RC type filter: less selective filter but which enables a 'faster signal processing.
• Chebyshev type filter: the most selective filter but which slows down 'signal processing.


Noise Rejection:
Nell 'analysis of signals with very little noise can' be difficult to obtain a stable synchronization of tracks: in this case should suitably set the level of hysteresis which regulates the operation of the trigger comparator.
Increasing the hysteresis value the trigger will be less sensitive to noise but it will require a larger amplitude signal to activate synchronization.
The hysteresis current level can be displayed on the screen (dotted line parallel to the trigger level) by checking the box [hysteresis line of visible trigger] on Form [Preferences] framework [Oscilloscope].

Note 1: the hysteresis value in mV is only true if the calibration has been performed as shown as preferred (see Calibrazione.rtf file).

Note 2: the hysteresis value, as well as the trigger level, are converted internally (and used) as integer multiples of the minimum quantization level allowed from 16 bits per sample sampling: this should be taken into particular consideration when the levels are set very small (ie of 'order of the current KCal).

When you use the Up-Down arrows to the 'setting the hysteresis level, the displayed values ​​(as used) are already integral multiples of the quantization step.




Istruzioni all' uso di AudioCardDSP
Vers. 3.0.0

Le istruzioni complete di AudioCardDSP non sono ancora disponibili.

Per l' uso degli strumenti consultare un qualsiasi testo di misure elettroniche.
Per sfruttare al meglio le possibilità offerte da questo programma leggere attentamente (ed eventualmente stampare) le note seguenti.

Contenuto:
·          Note generali.
·          Note per l' acquisizione dei segnali.
·          Note all' uso dell' analizzatore di spettro.
·          Note all' uso dell' oscilloscopio.
·          Note all' uso del "Frequency Transfer Function Curve Fitter".
·          Informazioni tecniche.
·          Avvertenze.
·          Strumentazione usata per sviluppo e tarature.
·          Bibliografia.

---------  OOOO  ---------

Note generali.
·           Per evitare di danneggiare la scheda audio, NON superare il valore di 5 ÷ 10 mV picco-picco all' ingresso microfono e di 3 V picco-picco all' ingresso Line In, prestando particolare attenzione ai potenziali di massa.
Per misurare tensioni di valore superiore a quanto sopra indicato, usare un partitore resistivo (possibilmente compensato).

·           In molte caselle degli strumenti i valori di impostazione possono essere scritti/modificati direttamente: in questo caso, se la casella dovesse assumere il colore giallo, confermare il nuovo valore con il tasto Invio (e solo successivamente, quando necessario, premere il pulsante [Applica]).
La modifica diretta dei valori serve solo per gli aggiustaggi fini: normalmente è sufficiente usare le freccette sù/giù che cambiano i valori in sequenze preselezionate.

·            Con i comandi [F ‡] dell' Analizzatore di Spettro e dell' Oscilloscopio è possibile trovare automaticamente valori di guadagno, attenuazione, etc... adatti ad una immediata visualizzazione dei segnali in esame: potranno, poi, seguire altre variazioni di scala più adatte ad una sicura quantificazione dei valori coinvolti.

·           Molte caselle hanno come testo di aiuto (ToolTipText) un valore correlato a quello principale: e.g. la casella [Time Base] dell' oscilloscopio ha, come testo di aiuto, il valore di frequenza corrispondente al periodo di una divisione orizzontale.

·           Alcune caselle (e.g. valori di Trigger, HoldOff, Alfa di medie esponenziali, etc...) vengono impostate a zero con un doppio "click" su di esse.

·           I cursori di misura possono essere spostati con il tasto sinistro del mouse premuto sullo schermo degli strumenti, sopra ed a destra del reticolo; le etichette dei cursori possono essere spostate con il tasto sinistro del mouse premuto su di esse.

·           Premendo il tasto destro del mouse sullo schermo degli strumenti, dove appare l' icona Menu, si può accedere direttamente alle opzioni dei relativi menu File.

·           Il titolo degli strumenti (scritta rossa in alto sugli schermi) è, di "default", il nome della scheda audio e del canale di ingresso selezionati e può essere cambiato con la voce di menu [File], [Cambia Titolo]; per eliminare completamente il titolo inserire solo uno spazio nella casella [Nuovo titolo?].

·            Le configurazioni di misura dell' Ananalizzatore di Spettro e dell' Oscilloscopio possono essere salvate, per un successivo utilizzo, con le relative voci dei menu [File]; le configurazioni di misura possono essere richiamate solo ad acquisizione ferma e/o a strumento spento.

·           Spuntando la casella [Inizia con ultima configurazione] nel Form [Preferenze], quadri [A. Spettro] e/o [Oscilloscopio], gli strumenti ricordano l' ultima configurazione di misura impostata e ripartono con questa ad ogni nuovo avvio.

·           Con le voci di menu [File], [Copia xxx negli Appunti] le immagini degli schermi e degli strumenti possono essere copiate negli appunti ("Clipboard") per essere poi inserite in una qualsiasi applicazione grafica (e.g. Windows Paint).
Parimenti, strumenti e schermi possono essere stampati con le relative voci di [File], [Stampa].


Note per l' acquisizione dei segnali.
·           Con le caselle del quadro [Linee di acquisizione] si può scegliere la sorgente del segnale da analizzare: Line In e Microfono permettono di analizzare segnali provenienti dall' esterno; Wave e CD permettono l' analisi dei suoni generati internamente dal PC. 
I canali disponibili sono, comunque, dipendendenti dalla scheda audio selezionata e devono essere abilitati dal "Recording Panel" di sistema, preferibilmente con il cursore di volume al massimo ed il cursore di bilanciamento al centro (vedi paragrafo Informazioni tecniche, sezione della calibrazione).
Il volume dei vari canali (se disponibile) può essere controllato, oltre che dal "Recording Panel" di Window, semplicemente "cliccando" con il pulsante destro del mouse il canale interessato e poi regolando l' apposito cursore.

·           Dal quadro [Strumenti], l' analizzatore di spettro e l' oscilloscopio possono essere accesi/spenti indipendentemente, anche durante le misure.

·           Gli strumenti virtuali di questa applicazione, diversamente da molti altri "colleghi" virtuali (ed anche da qualche strumento in "carne ed ossa"), sono stati progettati per lavorare in tempo reale, i.e. per elaborare TUTTI i campioni che la scheda audio è in grado di acquisire: questo richiede, evidentemente, una notevole capacità di calcolo da parte del PC impiegato (ed una scheda video non particolarmente lenta). Ho, pertanto, inserito la casella [t Elab] per mostrare il tempo medio (in ms e calcolato come media mobile su [N° buffers] eventi) impiegato dagli strumenti per elaborare il segnale e per disegnare i grafici: essa diventa rossa se il tempo medio impiegato è superiore al massimo concesso dai buffers in uso, con conseguente perdita di parte del segnale.
In questo caso, per continuare a lavorare in tempo reale, provare a:
·            disattivare gli strumenti (e le opzioni di misura) non necessari.
·            diminuire la frequenza di campionamento al minimo richiesto dalla misura corrente.
·            aumentare il N° di buffers.
·            usare, se possibile, il comando [HoldOff] dell' oscilloscopio per diminuire il carico di elaborazione dovuto al disegno delle tracce; anche diminuire al minimo l' intensità delle tracce può essere di notevole aiuto.

La casella [Ib:] segnala l' indice del buffer correntemente inviato agli strumenti per l' analisi. Sotto la casella  [Ib:], se vi sono buffer in coda, in attesa di essere inviati agli strumenti, appare una casella, (gialla se il N° di buffers in coda è minore del N° di buffers disponibili, rossa altrimenti), riportante il numero di buffers in attesa.

·           "Cliccando", con il tasto destro del mouse, la casella di abilitazione dell' oscilloscopio si attiva/disattiva un misuratore a barre del livello dei segnali in ingresso. Questo tipo di strumento, che personalmente considero abbastanza inutile, mi è stato chiesto da parecchi utenti di questo programma e l' ho pertanto incluso (pur tenendolo abbastanza defilato...) nella versione 2.7.2 e seguenti.


Note all' uso dell' analizzatore di spettro.
·           La casella [Trigger], quando "cliccata", commuta successivamente il trigger su: fronte positivo -> disattivato -> fronte negativo -> disattivato -> ...

·           Il pulsante [|>] del quadro Display mostra/nasconde una finestra con il segnale correntemente analizzato: questo è utile per regolare, nel caso di segnali complessi, il livello di trigger che comanda l' inizio della parte di segnale da analizzare; il livello di trigger può anche essere regolato, direttamente in questa finestra, spostando (con il tasto sinistro del mouse premuto a sinistra del reticolo) la posizione della linea (o della freccetta) orizzontale azzurra.
Per evitare di consumare inutilmente risorse di calcolo e di grafica, spegnere il visualizzatore di segnale non appena possibile.
"Cliccando", con il tasto destro del mouse, il pulsante [|>] si riporta la finestra del segnale alla posizione originale (qualora fosse stata spostata in posizione non più raggiungibile).

Nota: se è attiva la funzione di [Window], il grafico  mostra il segnale effettivamente analizzato dalla FFT (e quindi modificato in ampiezza dal profilo di Window) mentre il trigger viene ricercato sul segnale prima dell' operazione di "windowing".

·           E' possibile, dalla Vers. 2.7 ed a spese di un maggior carico di elaborazione, analizzare contemporaneamente due segnali selezionando la casella [Calcolo di due spettri] nel Form [Preferenze], quadro [A. spettro] ed abilitando, così, le funzioni Power Syy, Power Sxy, Ht(f) e Coherence function nel quadro [Display].

Il primo segnale (di seguito indicato come x) è la combinazione del canale #1 (sinistro) della scheda audio con il canale #2 (destro), come selezionata nel ComboBox [Source] del quadro [Main Input mode]; il secondo segnale (di seguito indicato come y) è sempre il canale #2 (destro) della scheda audio.
Nelle applicazioni pratiche delle funzioni di due segnali (Power Sxy, Ht(f) e Coherence function), la selezione di [Source] sarà sempre Ch1.
Il trigger viene sempre ricercato sul segnale x.
L' eventuale Window selezionata viene applicata, nello stesso modo, ad entrambi i segnali.

Le funzioni, attualmente disponibili, che richiedono il calcolo di due segnali sono:
·            Power Syy: auto spettro di potenza del segnale y.
·            Power Sxy: spettro di potenza mutuo del segnale x con il segnale y.
·            Ht(f): funzione di risposta in frequenza del sistema avente come ingresso il segnale x e come uscita il segnale y. Tenere presente che l' uscita y del sistema è caricata dall' impedenza d' ingresso della scheda audio.
·            Coherence function: coerenza del segnale x con il segnale y.
Piccola nota, sicuramente pleonastica: la misura della coerenza ha senso solo se vengono abilitate le opzioni di media su più spettri.

·           L' analizzatore di spettro (dalla Ver. 2.7) può anche essere usato come fonometro (sul campo di frequenze selezionato), sempre che il microfono e la scheda audio impiegati siano di qualità tale da garantire una risposta "piatta" in frequenza.
Per attivare questa funzione, procedere nel modo seguente:
·            selezionare l' ingresso da [Microfono] nel quadro [Canali di acquisizione] del Form [Acquisizione dei segnali].
·            selezionare la casella [Corr. di Sxx con curva psofometrica] nel Form [Preferenze], quadro [A. spettro], [Fonometro].
·            scegliere la curva di pesatura desiderata nel ComboBox [Tipo curva pesatura].
·            selezionare, nel quadro [Main Input mode], ComboBox [Source] dell' analizzatore di spettro, il segnale Ch1, Ch2 o Ch1 + Ch2 (attenzione: in molte schede audio l' ingresso da microfono è solo monofonico).
·            selezionare, nel quadro [Display], la funzione Power Sxx.
·            selezionare, per avere letture in dB(A|B|C|D), una scala ad ampiezza logaritmica nel ComboBox [Scale].
·            accertarsi che la funzione di Window non sia selezionata e che la percentuale di Overlap sia impostata a zero.
·            il tempo di misura può essere scelto impostando il valore di [N. Samples] nel quadro [Main Input mode] (vedere il ToolTip associato che presenta, in secondi, il tempo di misura).
·            l' intensità del suono, sul campo di frequenze selezionato, verrà riportata in alto, a destra del reticolo (in alto, a sinistra per lo spettrogramma 3D).
·            la casella [Coeff. di taratura] del Form [Preferenze], quadro [A. spettro], permette di calibrare questo strumento per confronto diretto con un fonometro tarato.

·            Dalla  Ver. 3.0.0 è possibile calcolare il Cepstrum (trasformata del logaritmo dello spettro di ampiezza) degli spettri visualizzati sullo schermo dello strumento.
Per utilizzare questa funzione occorre selezionare la casella [Calcolo del Cepstrum] nel Form [Preferenze], quadro [A. spettro], [Opzioni di calcolo].
Dal calcolo del Cepstrum viene pure derivata la "Fundamental Frequency Estimation".

·           Lo schermo di questo strumento presenta, in alto a destra, un punto colorato che diventa rosso se il tempo di elaborazione dello spettro (FFT, medie, grafico etc...) ha superato il massimo consentito dai buffers in uso: in questo caso l' analisi deve saltare oltre il buco che si è formato nel flusso dei dati in ingresso, con conseguente perdita di parte del segnale (attenzione: quando questo avviene, le misure con percentuale di "Overlap" maggiore di zero possono essere errate).

·           Il comando [¥ P.], del quadro [Plot], abilita il modo di visione a "persistenza infinita" che permette di sovrapporre sullo schermo tutti gli spettri via, via elaborati: è possibile, in questo modo, valutare le variazioni dovute al rumore, agli scostamenti istantanei di frequenza e di ampiezza, etc...
"Cliccando", con il tasto destro del mouse, su questo comando si eliminano gli spettri accumulati e si ricomincia la sovrapposizione.

·           Il comando [F ‡] dei quadri [Ref. level] e [Attenuation], se "cliccato" con il tasto sinistro, centra verticalmente il grafico (spettri, Ht(f) e coerenza) in modo che sia completamente contenuto all' interno del reticolo.

·           Il campo di frequenze (FMin -> FMax) visualizzato sullo schermo può essere spostato, entro i limiti consentiti e mantenendo la finestra iniziale, con il cursore [Center Freq.] oppure premendo il tasto sinistro del mouse sul grafico e quindi spostandolo.
Il comando [Find peak] del quadro [Freq. range] sposta il campo di frequenze (FMin -> FMax) in modo che sia visualizzato sullo schermo il valore di spettro più elevato.

·           Il tasto destro del mouse, premuto sul grafico degli spettri, fà apparire la finestra di zoom che può, quindi, essere dimensionata a piacere: al rilascio del tasto apparirà un menu pop-up per far coincidere le scale del grafico con quelle della finestra selezionata o per annullare l' operazione iniziata di zoom.

·           Il livello a 0 dB è arbitrariamente posto in corrispondenza del livello lineare 1 Vi|Wi.  Se la calibrazione (vedi file Calibrazione_KCal.rtf) è stata fatta nel modo indicato come preferenziale, risulteranno tarati i valori in dBu, dBV e dBm.
Nell' impostazione dell' impedenza Z0, per le misure in dBm, occorre tener conto dell' impedenza di ingresso propria della scheda audio.

·           I cursori di misura di frequenza dell' analizzatore di spettro si posizionano, per coerenza dei valori indicati, solo in corrispondenza delle frequenze effettivamente calcolate.

·           L' angolo di visualizzazione dello spettrogramma 3D può essere cambiato trascinando, con il tasto sinistro del mouse premuto, la + verde presente sull' asse dei tempi.  "Cliccando", con il tasto destro del mouse, il pulsante [ -> 3D] si riporta l' angolo di visualizzazione all' impostazione preferenziale di 45°, con passo di avanzamento e di scostamento di 5 pixels.


Note all' uso dell' oscilloscopio.
·           La posizione verticale delle tracce può essere regolata cambiandone il valore nella relativa casella [Pos] oppure, quando non sono attivi i cursori di misura, spostando (con il tasto sinistro del mouse premuto a destra del reticolo) la posizione dei riferimenti di zero.

·           La posizione orizzontale delle tracce può essere spostata con le freccette/cursore di [Hor. Position] oppure premendo il tasto sinistro del mouse sulle tracce e quindi spostandole; il pulsante [X 10 Mag.] aumenta di 10 volte la larghezza delle tracce.

·           Il livello di trigger può essere regolato con le freccette sù/giù di [Trig. Level] o, più semplicemente, spostando (con il tasto sinistro del mouse premuto a sinistra del reticolo) la posizione della linea (o della freccetta) orizzontale azzurra sullo schermo.
Se è attivo il filtro sul segnale di trigger (HF Reject, LF Reject o Spettro mobile) e se questo segnale viene visualizzato nella traccia #3, la linea orizzontale azzurra si sposta sul segnale filtrato per permetterne un uso più evidente.

·           Il punto di pre-trigger può essere variato con il cursore [PreTrigger Pos.] o spostando (con il tasto sinistro del mouse premuto sotto il reticolo) la posizione della linea (o della freccetta) verticale blu sullo schermo.

·           E' possibile (dalla Ver. 2.7.1) misurare la distanza temporale fra due successivi impulsi di trigger abilitando la casella [Misura ciclo del Trigger:] del Form [Preferenze], quadro [Oscilloscopio] scegliendo, pure, se si desidera una visualizzazione in frequenza o di periodo.
Gli impulsi di trigger vengono generati ad ogni passaggio del fronte in salita (o in discesa) del segnale attraverso il livello di trigger selezionato e non a frequenza di traccia.
Questo permette, con opportune regolazioni, di usare l' oscilloscopio come frequenziometro (o come misuratore di periodo) dei segnali periodici visualizzati sullo schermo.
La misura del ciclo di trigger è alternativa alla visualizzazione del tempo corrente di traccia (scritta in basso, sotto il reticolo).

Per ottenere una misura significativa di frequenza (o di periodo) del segnale visualizzato procedere nel modo seguente:
·            regolare il livello di trigger, meglio se in modo [Norm.], fino ad ottenere sullo schermo una traccia stabile. In modo [Sing.] ed in modo [Auto], quando gli impulsi di trigger vengono abilitati dall' operatore o generati dal contatore interno e non dal segnale in esame, il valore del ciclo del trigger viene scritto in rosso per segnalare la scarsa attendibilità dello stesso.  Nota: gli impulsi di auto-trigger, qualora non venga trovato un trigger normale, vengono generati alla frequenza di 20 Hz.
In caso di segnali dalla forma d' onda complessa usare opportunamente le opzioni offerte dal filtro di trigger.
·            per aumentare la precisione e la stabilità della misura (sempre nei limiti della precisione di "clock" della scheda audio) abilitare la casella [Average] mediando su di un elevato numero di tracce.
·            accertarsi che la casella [t Elab], del Form [Acquisizione dei segnali], non sia rossa: questo significherebbe che lo strumento non stà lavorando in tempo reale (vedi paragrafo Note per l' acquisizione dei segnali) e che quindi l' impulso di trigger potrebbe non essere generato ad ogni periodo del segnale; provare, in questo caso, a spegnere gli strumenti non necessari (Analizzatore di Spettro, Correlatore, etc...), ad eliminare le tracce non necessarie (base tempi ritardata, funzioni matematiche, segnale del trigger, etc...), a diminuire la frequenza di campionamento, ad aumentare il N° di buffers ed ad usare, se possibile, il comando [HoldOff].

·           Il comando [F ‡] dei canali di ingresso, se "cliccato" con il tasto sinistro, centra la traccia in modo che il suo valor massimo coincida con il massimo del reticolo e/o il suo valor minimo coincida con il minimo del reticolo; se "cliccato" con il tasto destro, centra la traccia in modo che sia esattamente compresa fra i riferimenti per la misura del "rise-time".

·           Il comando [¥ P.], posizionato sopra i quadri dei canali di ingresso, abilita il modo di visione a "persistenza infinita" che permette di sovrapporre sullo schermo tutte le tracce via, via elaborate: è possibile, in questo modo, valutare le variazioni dovute al rumore, agli scostamenti istantanei di ampiezza, al jitter etc...
"Cliccando", con il tasto destro del mouse, su questo comando si eliminano le tracce accumulate e si ricomincia la sovrapposizione.

·           Per velocizzare il disegno delle tracce, quando viene superato un certo valore di Campioni/Pixel, non tutti i campioni acquisiti vengono riportati sullo schermo: in questo caso il punto in alto a destra dello schermo diventa rosso, avvertendo che il segnale visualizzato potrebbe essere affetto dal fenomeno di "aliasing" o che potrebbero essere "saltati" transitori del segnale di durata inferiore a Skip campioni (vedere il valore corrente di Skip riportato, come testo di aiuto, sull' etichetta [s/Div]).
Anche il calcolo della derivata e dell' integrale, in queste condizioni, saranno affetti da errore perchè ho scelto di privilegiare la compatibilità del grafico della funzione con quello della traccia come disegnata, piuttosto che la loro esattezza numerica. Per limitare l' insorgenza di questo fenomeno usare, eventualmente, bassi valori di frequenza di campionamento quando servono valori elevati di [Time Base].

·           Se il valore impostato di [Time Base] è minore del periodo di campionamento la sua casella diventa rossa, avvertendo così che il disegno delle tracce stà perdendo di significato.

·           Il pulsante [Roll] serve ad abilitare il modo di visualizzazione a scorrimento, i.e. come se le tracce venissero disegnate su di un nastro di carta che continuamente scorre verso sinistra ed è utile per osservare, in modo continuo, l' evoluzione di segnali (normalmente aperiodici) a bassa frequenza (< 10 Hz).
"Cliccando", con il tasto destro del mouse, il pulsante [Roll] si mette in pausa l' avanzamento delle tracce; "cliccando" una seconda volta, con il tasto destro del mouse, le tracce ripartono da zero.

Il pulsante [Roll] è abilitato solo per i tempi di traccia (Time base) maggiori o uguali a 50 ms/Div; quando la visualizzazione è in modo "Roll" non possono essere selezionati tempi di traccia minori di 50 ms/Div.

Il pulsante [Roll] non appare se il PC impiegato non permette l' uso dell' "High-Resolution performance counter".

Per ottenere uno scorrimento il più possibile privo di saltellamenti ho implementato un sistema di avanzamento di tipo adattativo ed è quindi normale che la casella [t Elab] possa lampeggiare in rosso; questo non dovrebbe, comunque, pregiudicare la correttezza del segnale osservato. Se invece la casella [t Elab] e/o la casella [Ib] dovessero rimanere in rosso fisso, con conseguente perdita di parte del segnale, provare ad aumentare il "Passo delle tracce" nel Form [Preferenze], quadro [Oscilloscopio].

La miglior qualità del tracciato si ottiene osservando le seguenti precauzioni:
·             spegnere gli strumenti non necessari (e.g. l' Analizzatore di Spettro).
·             evitare di attivare, sullo stesso PC (ed a meno che la CPU impiegata non sia del tipo "multi-core"), applicazioni che richiedano periodicamente un forte uso di risorse di calcolo (e.g. il programma SigGen).
·             usare basse frequenze di campionamento, e.g. 8 kHz (alte frequenze di campionamento sarebbero comunque inutili vista la banda dei segnali osservabili).
·             diminuire al minimo possibile (vedi sopra) il "Passo delle tracce" nel Form [Preferenze], quadro [Oscilloscopio]. Il passo minimo accettabile dipende dall' impostazione corrente di "Time base" e dalle velocità della CPU e della scheda grafica impiegate.

Nota 1: la funzione matematica integrale (vedi paragrafo Math Functions), quando abilitata in modo "Roll", esegue un' integrazione continua del segnale che scorre sullo schermo e può, quindi, facilmente sparire oltre i limiti superiore od inferiore dello schermo.  Sono stato a lungo in dubbio se proporla ugualmente ma alla fine, considerata la sua utilità in molte situazioni (e.g. nella messa a punto dei sistemi di controllo), ho deciso di affidarmi alla comprensione da parte dell' operatore dei principi di integrazione.
La costante corrente di integrazione può, comunque, essere azzerata in qualsiasi momento "cliccando", col tasto destro del mouse, sulla lettera M a destra dello schermo sopra il riferimento di zero del grafico delle funzioni matematiche.  E' anche possibile limitare il risultato della funzione integrale all' interno dell' area dello schermo abilitando la casella "Auto limitazione dell' integrale" nel Form [Preferenze], quadro [Oscilloscopio], [Roll] ma, attenzione: l' uso di questa opzione può facilmente indurre ad errori nell' interpretazione del risultato dell' integrale.  L' auto limitazione non viene applicata quando il "Roll" è in pausa o quando vengono riviste tracce memorizzate.

Nota 2: quando in modo "Roll" la funzione di correlazione è disabilitata e non attiva.

Nota 3: l' uso del "Roll" può essere problematico su PC dotati di CPU con frequenza di clock inferiore ai 700 MHz o di schede video poco veloci.

·           Il pulsante [Math Functions] visualizza/nasconde i comandi per applicare alcune funzioni matematiche al segnale calcolato S(t) che può essere la traccia #1, la traccia #2 o la somma od il prodotto delle due.
Il grafico della funzione richiesta viene disegnato con la traccia #3, usando le impostazioni di attenuazione e posizione di quest' ultima.
I comandi di [S(t)], [|S(t)|], [Derivata di S(t)] ed [Integrale di S(t)] sono mutuamente esclusivi e vengono disattivati "cliccando" una seconda volta sul comando attivo; il comando [Funzioni di correlazione e statistica] apre la finestra con i calcoli di auto/mutua correlazione e con le funzioni di probabilità di ampiezza (con misure di valore minimo, massimo ed efficace) dei segnali (tracce) correntemente visualizzati sullo schermo dell' oscilloscopio.

Nel Form [Preferenze], quadro [Oscilloscopio] è possibile scegliere se la scala per la Derivata deve essere in Vi/s o in Vi/T, con T uguale al periodo di campionamento (1/Fs); parimenti, per l' Integrale, è possibile scegliere una scala in Vi*s o in Vi*T.

"Cliccando", con il tasto destro del mouse, il comando [Math Functions] si riporta il quadro delle funzioni matematiche alla posizione originale (qualora fosse stato spostato in posizione non più raggiungibile).

Nota 1: quando è attiva la funzione |S(t)| e S(t) è Ch2 o Ch1 * Ch2, l' inversione del canale Ch2 inverte il risultato della funzione e non il segno del segnale applicato a Ch2.

Nota 2: L' inversione del canale Ch2 non viene applicata al segnale passato alle funzioni di correlazione e statistica.

Nota 3: L' opzione di ricerca del massimo della funzione di correlazione (Check box [Max:] nel quadro [Cursors:]) trova il massimo della sola parte di funzione visualizzata sullo schermo e non su tutto il campo di correlazione calcolata: questo per rendere possibile una ricerca selettiva nell' intervallo di ritardi da considerare.

·           La traccia #3 è usata, per ora, dal "Delayed Time Base", dal grafico delle funzioni matematiche e dal segnale filtrato del trigger: queste tre ultime opzioni di misura sono, pertanto, mutuamente esclusive.
Per visualizzare e cambiare le impostazioni di attenuazione e posizione della traccia #3 aprire il quadro [Tr 3] con il pulsante [¯].

·            Le tracce, correntemente visualizzate sullo schermo, possono essere salvate su file (con menu [File], [Salva Tracce])  per poter essere, successivamente, riviste o usate in altre applicazioni.
Sono previsti due formati:
·             il formato .dso salva le tracce con tutte le informazioni necessarie all' eventuale, successivo richiamo (con menu [File], [Leggi Tracce]) sullo schermo dell' oscilloscopio.
·             il formato .txt salva le tracce in modalità testo, per poterle eventualmente usare in altre applicazioni (e.g. Excel).
Il formato del file generato è:

 Titolo della misura

 Data della misura
 Ora della misura

 t(0) V1(0) V2(0)
 .... ..... .....
 t(i) V1(i) V2(i)
 .... ..... .....
 t(n) V1(n) V2(n)

con t(i), V1(i), V2(i) rispettivamente uguali al tempo, valore della traccia #1, valore della traccia #2 del campione i-esimo; i valori di V1(i) e V2(i) sono quelli, interi, letti dal convertitore ADC della scheda audio e non modificati dal coefficiente KCal.


Note all' uso del "Frequency Transfer Function Curve Fitter".
·         E' possibile (dalla Ver. 2.8.0) attivare una funzione di ricerca degli zeri e dei poli delle funzioni di risposta in frequenza, Ht(f), misurate con l' Analizzatore di Spettro.
La tecnica (MDOF) usata per la stima dei parametri della funzione di trasferimento è quella di interpolare, minimizzando l' errore quadratico medio risultante, l' Ht(f) data con una funzione razionale di due polinomi, Ht(p), a coefficienti reali.
Vengono, per ora, stimati solamente i coefficienti dei polinomi al numeratore/denominatore, il guadagno e gli zeri ed i poli calcolati come radici (complesse) dei due suddetti polinomi espressi in forma normale.
Per un buon uso di questo strumento di ricerca è richiesta una, sia pur minima, conoscenza della teoria delle funzioni di trasferimento e delle funzioni di rete.

·         Lo strumento di ricerca può essere attivato dalla voce di menu [Strumenti], [Ht(f) Fitter] oppure dall' Analizzatore di Spettro con il pulsante [Ht(f) Fitter] che viene abilitato nel quadro [Storage] quando sia stata richiamata una funzione di risposta in frequenza precedentemente misurata e memorizzata in una delle 10 locazioni di memoria e che sia stata scelta l' opzione di visualizzazione Ht(f) nel quadro [Display:].
·               Quando lo strumento è richiamato dal menu [Strumenti], possono essere letti ed analizzati files .HtF precedentemente salvati dall' Analizzatore di Spettro o files compatibili, tipo quelli .ZxM salvati con lo strumento VectImp (per analisi di funzioni di rete).  In questo caso il campo di frequenze usato per l' analisi è tutto quello definito nel file (vedi, più sotto, il formato dei files).
·               Quando lo strumento è richiamato con il pulsante [Ht(f) Fitter], il campo di frequenze usato per l' analisi è quello correntemente selezionato sullo schermo.  E' conveniente, in questo caso e per minimizzare l' effetto del rumore, inviare all' analisi Ht(f) mediate su più misure.  Suggerimento: verificare, eventualmente, l' attendibilità della misura con la funzione di coerenza.

·         Prima di procedere con l' analisi, pulsante [Calc Norm. Poly], occorre definire approssimativamente il grado dei polinomi che interpoleranno le funzioni Ht(f) o Zx(f).
·               Se i gradi impostati dei polinomi non sono sufficienti a definire gli zeri ed i poli  presenti nell' Ht(f) visualizzata sullo schermo, la curva interpolante calcolata e visualizzata (in modulo e fase) si discosterà da quella richiesta: aumentare, in questo caso, i gradi dei polinomi interpolanti fino ad ottenere una buona corrispondenza delle curve (ed un piccolo valore di RMS Err).
·               Se, al contrario, i gradi impostati sono troppo alti la corrispondenza delle curve sarà in generale molto buona ma verranno calcolati zeri e poli in eccesso: in questo caso passare alla tabella [Zeros / Poles], spuntare successivamente zeri e poli (per primi quelli scritti in rosso), sintetizzare la curva corrispondente a quelli rimasti con il pulsante [Syntethize with selected roots], osservare la curva risultante e considerare come validi gli zeri ed i poli sufficienti a fornire il grado di interpolazione desiderato.

Nota 1: per una più facile valutazione della curva sintetizzata, il valore di Kg (guadagno della funzione di trasferimento espressa in forma normale) viene calcolato in modo da minimizzare l' errore quadratico fra il modulo dell' Ht(f) data e quello dell' Ht(p) interpolata (calcolata a s = 0).

Nota 2: sono, arbitrariamente, considerati come non significativi (e scritti in rosso) zeri e poli aventi frequenza naturale di risonanza Wo maggiore di Fs/2.

·           Con la voce di menu [File], [Salva Kg, Coefficienti, Zeri e Poli] possono essere salvati su file, in formato .txt, tutti i parametri rilevanti dell' Ht(p) interpolante.
Nota: i coefficienti dei polinomi salvati sono quelli della funzione di trasferimento espressa in forma normale, i.e. con i coefficienti dei gradi più alti ridotti all' unità e raccolti in Kg.

·         Il formato dei files Ht(f) (.HtF e .ZxM) accettato (e generato) da questo strumento è:

Fs
Fr(1), HtRe(1), HtIm(1)
....., ......., .......
Fr(i), HtRe(i), HtIm(i)
....., ......., .......
Fr(n), HtRe(n), HtIm(n)

con Fs pari alla frequenza di campionamento usata per generare l' Ht(f) e Fr(i), HtRe(i), HtIm(i) rispettivamente uguali a frequenza, parte reale, parte immaginaria del campione i-esimo dell' Ht(f) in esame.


Informazioni tecniche.
·           I canali di ingresso sono calibrati (tramite il coefficiente moltiplicativo KCal) per avere un' altezza di traccia di 1 Vi in corrispondenza di un segnale sinusoidale di 1 V picco-picco e di 1 kHz applicato all' ingresso Line In della scheda audio; il cursore di volume del Line In, sul Recording Panel, deve essere al massimo ed il cursore di bilanciamento al centro.  Altri modelli di scheda audio, diversi dalla mia Sound Blaster Live!, possono richiedere coefficienti di calibrazione diversi ed anche di ridurre il valore di volume per evitare la saturazione del canale Line In (come avviene, e.g., per la Realtek HD Audio Input).
I coefficienti di calibrazione dipendono anche dalla frequenza di campionamento della scheda audio e sono stati trovati sperimentalmente con l' aiuto di un generatore di segnali Exact 126, di un oscilloscopio Tektronix 468 e di un multimetro Tektronix TX1.

Dalla Vers. 2.1 in poi, i coefficienti di calibrazione possono essere cambiati con il Form [Coefficienti di calibrazione] che prevede le frequenze di campionamento di 8000, 11025, 16000, 22050, 24000, 32000, 44100 e 48000 Hz.  Per le frequenze non previste e minori di 48000 Hz viene usato il KCal di 11025 Hz; per quelle superiori a 48000 Hz viene usato il KCal di 48000 Hz.

Dalla Vers. 2.7.1 è possibile, con il pulsante [Trova] del Form [Coefficienti di calibrazione], calcolare automaticamente un valore di KCal normalmente più che sufficiente a questa applicazione (leggere, con il pulsante [?], le istruzioni del file Calibrazione_KCal.rtf).

E' possibile, dalla Vers. 2.7, dichiarare esplicitamente le unità di misura desiderate per ognuno dei due canali di ingresso, unità che verranno poi riportate sulle scale dei grafici.

·           Con scheda audio SB Live! la banda passante a -3 dB và da 7 Hz a 21 kHz; le tensioni di ingresso, in zona lineare, sono di 3 V picco-picco per l' ingresso Line In e di 3 mV picco-picco per l' ingresso Microfono.

·           Con scheda audio SB Live!, il segnale campionato del canale #2 (destro) è in ritardo di circa 1/48000 s rispetto al canale #1 (sinistro): evidentemente viene usato un solo convertitore A/D, commutato alternativamente sui due canali. Questo viene avvertito sulle tracce solo con valori di Time Base molto piccoli o con la visualizzazione in modo X-Y.
Questo fenomeno, dalla Vers. 2.4 in poi, è compensato tramite l' uso del coefficiente CompMUX, modificabile nella tabella richiamata dal menu [Calibrazione] (ho dovuto farlo perchè, avendo aggiunto il modo X-Y, l' errore di fase risultava inaccettabile).

L' operazione di compensazione introduce una distorsione (lieve ma misurabile) sul segnale del canale #1 e quindi, per misure precise e/o quando la sfasatura fra i due canali sia di secondaria importanza, è consigliabile impostare a zero il coefficiente CompMux.
Il ritardo, invece, non si presenta acquisendo i segnali dal canale Wave: in questo caso impostare a zero il coefficiente CompMUX.

Dalla Vers. 2.6 è possibile, con il pulsante [Trova] del Form [Coefficienti di calibrazione], calcolare automaticamente un valore di compensazione normalmente più che sufficiente a questa applicazione (leggere, con il pulsante [?], le istruzioni del file Compensazione_MUX.rtf).
Il valore V2/V1, calcolato insieme a CompMUX, è il rapporto di guadagno fra i due canali della scheda audio, valore che nel caso ideale dovrebbe essere uguale ad uno.

·           Alcune schede audio arrivano a frequenze di campionamento Fs molto elevate (fino a 192 kHz) e gli strumenti di questa applicazione permettono di usarle.
Attenzione, però: l' effettiva banda passante non aumenta, generalmente, fino a circa Fs/2 ma è quasi sempre limitata, internamente alla scheda audio, da un filtro passa-basso (con Ft di circa 20 kHz).

·           La risoluzione usata per il convertitore A/D della scheda audio è di 16 bits per campione: questa risoluzione è più che sufficiente per la quasi totalità delle misure praticabili, specialmente quando si consideri che i migliori oscilloscopi in commercio (Tektronix, HP, etc..) usano convertitori a 8 o 12 bits per campione.
Con l' analizzatore di spettro questa risoluzione permette una dinamica di 90 dB.


Avvertenze.
·           Questo progetto è stato sviluppato usando il "." come separatore decimale; nonostante abbia cercato di prevenire possibili problemi dovuti all' uso della "," non posso escludere che sia rimasta qualche incongruenza.
In particolare potrebbe essere fonte di guai la lettura, dal file AudioCardDSP.ini (specialmente con Windows XP!), dei parametri di calibrazione (vedere i valori assegnati nella routine LeggiParametri e successivamente osservabili con il Form richiamato dal menu [Calibrazione]).
In caso di malfunzionamenti dovuti a questo problema, provate a cambiare sul vostro PC le impostazioni internazionali e datemi notizia dei "bugs" trovati.

·           Per un comodo uso degli strumenti di questo progetto è consigliabile avere una risoluzione dello schermo di almeno 1024 x 768 Pixels.
Per un miglior utilizzo dello strumento Oscilloscopio è consigliabile l' uso di CPU Pentium III a 500 MHz o superiori.

·           Non forzare (e.g. con Task Manager) e specialmente in IDE, l' arresto di questo programma quando è attiva l' acquisizione dei segnali: il collegamento con la scheda audio resterebbe aperto impedendo ogni successivo riavvio ed obbligando ad uno "shut-down" e "restart" del sistema.
Usare sempre, prima di chiudere, il pulsante [Stop] del Form Acquisizione dei segnali.

·           Questa versione non può funzionare per più di (circa) 13 ore continuative.


Strumentazione usata per sviluppo e tarature.
·           Digital Storage Oscilloscope, Tektronix 468.
·           VCF/Sweep Generator, Exact 126.
·           True RMS Multimeter, Tektronix TX1.
·           Digital Wave Form Generator for Sound Cards, SigGen 3.1 di F. Languasco.


Bibliografia.
·           Theory and Application of Digital Signal Processing - L. Rabiner, B. Gold - Prentice-Hall Inc.
·           Digital Signal Processing - W. Stanley - Reston Publishing Company Inc.
·           Digital Filters and their Applications - V. Cappellini, A. G. Constantinides, P. Emiliani - Academic Press.
·           Digital Time Series Analysis - R. Otnes, L. Enochson - John Wiley & Sons.
·           Numerical Recipes in FORTRAN 77 - William H. Press.
·           Oscilloscope Trigger Circuits - H. Magee - Tektronix Circuit Concepts.
·           Sweep Generator Circuits - K. A. Kinman - Tektronix Circuit Concepts.
·           The Fundamentals of Signal Analysis - Hewlett Packard, Application Note 243.
·           Control System Development Using Dynamic Signal Analyzers - Hewlett Packard, Application Note 243-2.
·           The Fundamentals of Modal Testing - Hewlett Packard, Application Note 243-3.
·           Tektronix 468 Digital Storage Oscilloscope, Operators Instruction Manual.
·           Agilent 6000 Series Oscilloscope, Users's Guide.
·           Misure Elettroniche - Appunti dai Corsi del Politecnico di Torino.

·           Teoria delle reti elettriche - Appunti dai Corsi del Politecnico di Torino - CLUT Editrice.


Calibrazione dei coefficienti KCal


Calibrazione generica:
·           Applicare all' ingresso (LineIn o Microfono) un segnale sinusoidale di 1 kHz, di ampiezza nota (ma sempre nei limiti permessi dalla scheda audio) ed iniziare le misure.

·           Regolare, alle varie frequenze di campionamento, i coefficienti di calibrazione per avere l' ampiezza di traccia e/o di riga desiderata.
In questo modo sarà possibile, e.g., calibrare l' uscita di un trasduttore nell' unità ingegneristica desiderata: un accelerometro con sensibilità di 312 mV/g potrà dare, con opportuna regolazione del coefficiente KCal, letture dirette in g/Div (impostare a "g" la relativa unità di misura).
I coefficienti KCal possono anche essere negativi, qualora fosse desiderabile invertire i segnali in ingresso.

Calibrazione preferenziale:
·           Applicare all' ingresso LineIn un segnale sinusoidale di 1 kHz con ampiezza di 2 V picco-picco (0.707 Vrms misurati con un voltmetro a vero valore efficace) ed iniziare le misure

·           Effettuare, sull' oscilloscopio, le regolazioni:
·           Ch1, Ch2 a 0.2 Vi/Div, Pos = 0.
·           ¥ P. = non selezionata.
·           Time Base = 0.001 s/Div
·           X-Y = non selezionato
·           Trigger mode = Auto
·           Intensity = 1
·           Average = selezionato
·           N° of sweeps = 100

·           Regolare, alle varie frequenze di campionamento, i coefficienti di calibrazione per avere tracce che coprano esattamente l' intera ampiezza verticale del reticolo. Premere il pulsante [Applica], dopo ogni modifica dei valori, per poter valutare l' effetto della variazione.

·           Con questa calibrazione e per segnali applicati all' ingresso LineIn, le scale degli strumenti saranno tarate in Volts e risulteranno pure tarati i valori in dBu, dBV e dBm dell' analizzatore di spettro.

·           Con il pulsante [Trova], dopo aver applicato ad entrambi gli ingressi LineIn uno stesso segnale sinusoidale di 1 kHz con ampiezza di 2 V picco-picco (0.707 Vrms misurati con un voltmetro a vero valore efficace), viene calcolato, alla frequenza di campionamento correntemente selezionata, un valore di KCal normalmente più che sufficiente a questa applicazione.  Correggere, eventualmente, il valore trovato fino ad ottenere la precisione desiderata.  Usare, per questa funzione, un segnale molto preciso in frequenza (1 kHz), e.g. quello generato dal programma SigGen.
Il valore calcolato è quello relativo al canale #1 (sinistro); il rapporto di guadagno fra i due canali della scheda audio, valore che nel caso ideale dovrebbe essere uguale ad uno, viene riportato come testo di aiuto (tooltip) nella casella KCal correntemente attiva.

Nulla vieta, ovviamente, di applicare agli ingressi un segnale di 1 kHz con ampiezza qualsiasi (ma sempre nei limiti permessi dalla scheda audio): si avrà, in questo modo, la corrispondenza dell' unità di scala degli strumenti con l' ampiezza del segnale applicato (vedi, sopra, l' esempio dell' accelerometro).

E' possibile, dalla Ver. 2.7, dichiarare esplicitamente le unità di misura desiderate per ognuno dei due canali di ingresso, unità che verranno poi riportate sulle scale dei grafici.


Il pulsante [Applica] usa i coefficienti impostati solo nella sessione di misure corrente; il pulsante [OK] usa i coefficienti impostati nella sessione corrente e li salva nel file .INI per essere usati anche nelle sessioni future.


Compensazione del Multiplexer


Procedura di compensazione MUX:
·           Applicare ad entrambi gli ingressi di LineIn uno stesso segnale sinusoidale di 1 kHz, di 2 V picco-picco (0.707 Vrms misurati con un voltmetro a vero valore efficace) ed iniziare le misure.

·           Effettuare, sull' oscilloscopio, le regolazioni:
·           Ch1, Ch2 a 0.2 Vi/Div, Pos = 0.
·           ¥ P. = non selezionata.
·           Time Base = 0.001 s/Div
·           X-Y = selezionato
·           Trigger mode = Auto
·           Intensity = 1
·           Average = selezionato
·           N° of sweeps = 100

·           Regolare il coefficiente di Compensazione MUX affinchè sullo schermo venga disegnato solo un segmento.  Il disegno di un ellisse indica un residuo errore di fase.
Premere il pulsante [Applica], dopo ogni modifica dei valori, per poter valutare l' effetto della variazione

Con il pulsante [Trova] viene calcolato un valore di compensazione normalmente più che sufficiente a questa applicazione.  Correggere, eventualmente, il valore trovato fino ad ottenere la precisione desiderata.  Usare, per questa funzione, un segnale molto preciso in frequenza (1 kHz), e.g. quello generato dal programma SigGen.
Il valore V2/V1, calcolato insieme a CompMUX, è il rapporto di guadagno fra i due canali della scheda audio, valore che nel caso ideale dovrebbe essere uguale ad uno.

Non posso escludere che per alcuni modelli di scheda audio il coefficiente sia inutile (Cm = 0 s) o debba persino essere negativo.

Il pulsante [Applica] usa il coefficiente calcolato solo nella sessione di misure corrente; il pulsante [OK] usa il coefficiente calcolato nella sessione corrente e lo salva nel file .INI per essere usato anche nelle sessioni future.




Preferenze del Trigger


Filtro sul segnale del trigger:
Quando vengono usati i vari filtri del trigger e specialmente con lo spettro mobile, è molto conveniente utilizzare la traccia #3 (pulsante [-> Tr3], quadro [Source Ch:] dell' oscilloscopio) per poter vedere l' effettivo segnale impiegato nella sincronizzazione.

Il pulsante [Applica] usa i coefficienti impostati solo nella sessione di misure corrente; il pulsante [OK] usa i coefficienti impostati nella sessione corrente e li salva nel file .INI per essere usati anche nelle sessioni future.


·               Passa-basso: permette la sincronizzazione del trigger sulla componente a bassa frequenza del segnale (HF reject).

·               Passa-alto: permette la sincronizzazione del trigger sulla componente ad alta frequenza del segnale (LF reject).

·               Spettro mobile: permette la sincronizzazione del trigger sulla comparsa (o scomparsa) di una determinata frequenza nel segnale sotto esame, e.g. nell' analisi delle sequenze tonali (selettive).
Con il valore di ritardo è possibile regolare la selettività del filtro: ritardi maggiori corrispondono a maggior selettività ma a maggiori ritardi nella risposta del filtro. Come valore indicativo, usare un ritardo pari ad almeno 10 periodi della frequenza da sincronizzare.

·               Tipo del filtro (solo per Passa-basso e Passa-alto):
·            Filtro di tipo RC: filtro meno selettivo ma che permette un' elaborazione più veloce del segnale.
·            Filtro di tipo Chebyshev: filtro più selettivo ma che rallenta l' elaborazione del segnale.


Reiezione del rumore:
Nell' analisi di segnali con molto rumore puo' essere problematico ottenere una stabile sincronizzazione delle tracce: in questo caso conviene impostare opportunamente il livello di isteresi che regola il funzionamento del comparatore di trigger.
Aumentando il valore di isteresi il trigger sarà meno sensibile al rumore ma potrà richiedere un segnale di ampiezza maggiore per attivare la sincronizzazione.
Il livello corrente di isteresi può essere visualizzato sullo schermo (linea punteggiata parallela al livello di trigger) spuntando la casella [Linea di isteresi del trigger visibile] sul Form [Preferenze], quadro [Oscilloscopio].

Nota 1: il valore di isteresi in mV è vero solo se la calibrazione è stata eseguita nel modo indicato come preferenziale (vedi file Calibrazione.rtf).

Nota 2: il valore di isteresi, come pure il livello di trigger, vengono internamente convertiti (ed usati) come multipli interi del minimo livello di quantizzazione permesso dal campionamento a 16 bits per campione: di questo occorre tener particolarmente conto quando i livelli impostati sono molto piccoli (i.e. dell' ordine del KCal corrente).

Quando vengono usate le freccette Up-Down per l' impostazione del livello di isteresi, i valori visualizzati (ed usati) sono già multipli interi del passo di quantizzazione.