Presentazione sul tema: "National Instruments Italy"— Transcript della presentazione:
1 National Instruments Italy L’utilizzo della Strumentazione Virtuale per le Misure Industriali
2 Agenda Introduzione alla strumentazione Virtuale Elementi di una catena di misuraDimostrazione di LabVIEWEsercitazioni e supporti
3 National Instruments Italy Fondata nel 198950+ dipendentiUffici a Milano e a RomaDivisione CommercialeDivisione TecnicaDivisione MarketingDivisione Didattica e RicercaSito - Didattica e RicercaDispenseEsercitazioniOpportunita’ di lavoroISO 9002Certified
4 Divisione Didattica e Ricerca Fondata nel 1997Strutture dedicate esterneUffici a Milano e a Roma, Torino,Firenze,Genova,Padova100% operativi nel mondo accademicoPoliticheProdottiAttivita’ di training…certificazione!ISO 9002Certified
7 IL PC dentro lo strumento VantaggiInterfaccia Windows familiare, aggiornamento software automatico, connettività di retePotenza di processamento a più basso costoSistemi operativi standardAggiornamento software (on line) più facile
8 IL PC dentro lo strumento Un esempio : HP Infinium
9 Lo Strumento nel PC L’utilizzatore può scegliere il computer L’utilizzatore acquista solo le funzionalità che utilizzaL’utilizzatore ha il controllo TOTALE del sistemaL’utilizzatore si avvantaggia delle nuove tecnologieGli strumenti nel PC sono il REALE vantaggio per l’ utente, permettendo di fruire appieno della rivoluzione tecnologia dei personal computerCosti minori vs prestazioni migliori
10 Gli Elementi di un sistema di Misura OscilloscopioSorgente di SegnaleMultimetriMatrici
14 Componenti della Misura Condiziona-mentoDigitalizzazioneComputerSegnaliSensoriTermocoppieRTDTermistoreStrain GaugePressioniCarichiTensioniCorrentiDigitaliAmplificazioneAttenuazioneIsolamentoFiltraggioMultiplexingEccitazioneSSHF-to-VBridge Comp.FrequenzaRisoluzioneAnalisiPresentazioneDistribuzioneEvery measurement system has the same fundamental components, a signal source, signal conditioning, a digitizer, and a computer. While these components may be delivered in a single package, or divided up into multiple pieces, they still play the same role. Understanding this model opens new possibilities for creating your measurement system, one where you decide the features that are important for your application.
15 Le schede di acquisizione dati Un classico esempio: scheda DAQ su PCI8 canali ADC 12/16 bitGuadagno programmabileRange di ingresso selezionabileDa 20 a KS/s2 canali DAC 12/16 bitUscita fino a 42VoltsDa 8 a 32 I/O digitali TTL2 Contatori/TemporizzatoriQuante applicazioni possono essere risolte?
17 Caratteristiche delle schede DAQ Convertitore ADCNumero di canaliRisoluzioneVelocita’ di CampionamentoAmpiezza segnaleMultiplexer o SSFiltri AntiAliasingConvertitore DACPorte digitaliNumero di lineeLivello SegnaleDirezionalita’Contatori e/o TemporizzatoriFrequenza
18 Schema a blocchi di una scheda DAQ MultiplexerAmplificatoreConvertitore Analogico/DigitaleMUXADCNI-PGIABus disinconizzazioneAnalog InputAnalog OutputNI DAQ-STCDigital I/OThere are two basic formats for the analog input design of a DAQ board: Multiplexed boards and simultaneous boards. Multiplexed boards are optimized for DC accuracy and channel density. Only one A/D converter is used to scan all of the channels, so the sampling rate has to be divided among the channels. Also, there is a slight delay between each channel sample. Simultaneous boards are optimized for faster sampling rates per channel and DC and dynamic measurements. Although they generally have lower channel density, there is no delay between channels when sampling.Counter I/ONI MITEStep-by-Step Data Acquisition ni.com
19 Multiplexers Scopo: incrementare il numero dei canali ADC Another common signal conditioning technology is a multiplexer. A multiplexer expands the number of signals that can be routed to a single digitizer. Single-ended measurement systems only require one set of multiplexers, because all measurements are performed with respect to a single reference voltage. Differential measurement systems require multiple multiplexers, so you can route the positive and negative signal reference to the digitizer together.Multiplexers are generally less expensive than digitizers. Therefore, they provide an inexpensive method of increasing your systems channel count.Scopo: incrementare il numero dei canali
20 Acquisizione con Multiplexers Interchannel DelayPhase ShiftEach signal is routed through the multiplexerTime delay between sampling of each channelPhase shift is negligible for most applicationsWhen acquiring signals with a standard multiplex-based measurement system, there is a delay between reading one channel and reading the next channel. This is a common phenomenon resulting from the architecture of the system. This delay, called inter-channel delay, appears as a phase shift in your acquired signals.Good data acquisition systems reduce this effect by using additional clocks to change the multiplexer from one channel to the next at a fast rate. Therefore, while you may be acquiring data from any given channel at a slow rate, the time delay between each channel reading is very small. For most applications, this solution is completely sufficient.However, for applications where you are specifically examining the phase relationship between two or more channels, this phase shift may not be acceptable. Even a 1 MHz digitizer has an inter-channel delay of 1 μs. If this introduces too much error for your application, you have several options. You can use a separate digitizer for each input signal. This option is generally expensive and requires intricate timing. You can make adjustments in software, but this can be intensive. Your third option is to purchase a system with simultaneous sampling capabilities via track-and-hold amplifiers, described on the next page.
21 Campionamento Simultaneo T/HT/HNo Phase ShiftDigitizer control signal locks the track-and-hold amplifiersSignals are routed through the multiplexerTrack-and-hold amplifiers are releasedSimultaneous sampling systems replace standard amplifiers with special “track-and-hold” amplifiers. Track-and-hold amplifiers perform the same functions as standard amplifiers, except they can be commanded to hold their present signal level for a period of time. Once the amplifier is in hold mode, a multiplex-based system can then read the signal from each channel. Once all channels are scanned, the amplifiers are released to start tracking their incoming signals again. This method can reduce the inter-channel delay to values below 5 ηs.Since track-and-hold amplifiers must be allowed time to change between track-and-hold mode, they often offer slower acquisition rates than systems without track-and-hold amplifiers. However, they are a less expensive solution than the alternative, which is to use a separate A/D converter for each channel.
22 Tecniche di miglioramento del rapporto segnale rumore ( Dithering )
24 Dithering 12-bit Without Dithering 9 Actual Signal 1 bit (4.8 mV for 12-bit board with +/- 10 V input range)Actual SignalApplying .5 LSB of Gaussian white noise to the original signal (dithering) causes the board to “flip bits”, whereas the original signal may have only been interpreted as the upper level. However, since this signal resides in the top half of the code width, the “bit flipping” will be weighted, so that, when you average the resulting signal over a large number of points, it will essentially represent the signal as accurately as a 14-bit board.Weighted Average = 4.8mVActual Signal = 3.3mV
25 Dithering 6 Dithering Applied 3 Weighted Average = 4.8mV 1 bit (4.8 mV for 12-bit board with +/- 10 V input range)Dithering Applied3Applying .5 LSB of Gaussian white noise to the original signal (dithering) causes the board to “flip bits”, whereas the original signal may have only been interpreted as the upper level. However, since this signal resides in the top half of the code width, the “bit flipping” will be weighted, so that, when you average the resulting signal over a large number of points, it will essentially represent the signal as accurately as a 14-bit board.Weighted Average = 4.8mVActual Signal = 3.3mVDithered Weighted Average = 3.2mV
26 Tecniche di miglioramento del rapporto segnale rumore Range & Guadagno
27 RangeLa risoluzione dell’ A/D è distribuita all’ interno del range di acquisizioneMassima Risoluzione = Range Corretto10020015050Time (ms)-7.50-10.00-5.00-2.502.505.007.5010.00Amplitude(volts)Range = -10 to +10 volts(5kHz Sine Wave)3-bit resolution000001010011101110111|Choosing the proper range for a signal is very important to help maximize the resolution of our ADC. To illustrate this, let us revisit our sine wave and our 3-bit ADC. Due to poor resolution we are still not going to be able to represent our sine wave very well. However, an improper choice of range can make our representation of the sine wave even worse. Our sine wave has a minimum value of 0 Volts and a maximum value of +10 Volts. If we choose our range as Volts we will have 8 different voltage levels we can represent. If we were to improperly choose a range of -10 to +10 Volts we would now only have 4 voltage levels to represent our signal, because the other 4 levels would be used by the 0 to -10 Volt range. Our smallest detectable voltage would change from 1.25 to 2.50 and we would get a worse representation of our sine wave. As you can see improperly choosing the range will negatively impact the representation of your signal. However, we do not always have a choice as to what range to pick. For instance, if our sine wave actually went from -2 to +8 Volts, we could not choose 0 to +10 Volts as our range, because the signal does not fit within that range. We would be forced to choose a range of -10 to + 10, even though it spreads out our resolution.
28 Condizionamento: amplificazione AmplifierOttimizza la risoluzione nel range di misura scelto16-bitDigitizer10 Vsignal65,536 livellidi risoluzione16-bitDigitizer10 mVsignalSolo 32 livellidi risoluzione!One benefit of amplification is that it takes full advantage of all of the possible measurement values associated with the resolution of the analog-to-digital converter. Consequently, it can increase the accuracy of your measurement by a factor of 100 times or more.Amplification:Increases the amplitude of your signalProvides better match to the input range of your ADCIncreases sensitivity of your measurementOne of the most common types of signal conditioningRange +/-10 VoltsStep-by-Step Data Acquisition ni.com
29 Condizionamento: amplificazione AmplifierMigliora il rapporto segnale/rumore (SNR)RumoreAmplificatore differenziale di classe strumentale+_In addition to taking full advantage of all of the possible measurement values associated with the resolution of the analog-to-digital converter, amplification also increases the size of your signal compared to the noise around the wires and cabling. This allows you to detect small changes in your signal faster, and it can reduce calculations and measurement time.Add an amplifier with a gain of 1,000To amplify to a 10 V signalTo reduce the amplitude of noise with respect to the amplitude of the signalYou must amplify your signal so that the noise has less effect on your signalYou can do this by moving the amplification close to your signal sourceADCCaviSegnale di basso livelloAmplificatore esternoScheda DAQStep-by-Step Data Acquisition ni.com
30 Esempio di amplificazione Segnale d’ ingresso = VoltsADC Range = VoltsSettaggio del guadagno dell’ amplificatore = 210020015050Time (ms)1.255.002.503.756.257.508.7510.00Amplitude(volts)Different Gains for 16-bit Resolution(5kHz Sine Wave)Gain = 2|Your SignalGain = 1Amplified SignalApplying a gain to an analog input signal is very similar to amplifying your voice with a microphone. If you tried speaking in a stadium for 100, 000 people without a microphone, very few of the 100,000 people will be able to hear your voice. However, if you amplify your voice with a microphone you can maximize the number of people that can hear you. In the same way a small signal will not be able to use the entire resolution of the ADC, unless a gain is applied to amplify the signal. Let us take a look at how the gain setting affects an analog input signal. Assume we have a sine wave with a range of 0 to +5 Volts and an ADC range of 0 to 10 Volts. As you can see above if we applied a gain of 1 (no change) to our signal we would only be taking up half of the range, and thus using only half of our resolution. However, if we apply a gain of 2 to our signal we now have a sine wave with a range of 0 to +10 Volts. Now our signal fits exactly in our range and we will be maximizing the use of our resolution. Now let us consider a sine wave with a range of 0 to +6 Volts with the same ADC range of 0 to +10 Volts. We can no longer apply a gain of 2, because our sine wave would have a range of 0 to +12 Volts which exceeds our ADC range. The only gain we can apply is a gain of 1. It is also important to note that if we put a 0 to +5 Volt signal into our device, our graph in LabVIEW will show a 0 to +5 Volt signal regardless of the gain that is applied. The gain setting is only used to maximize the use of the ADC resolution. It will not affect your measurement.
31 Signal to Noise Ratio (SNR) Maggiore è l’ SNR, meglio èObbiettivo: amplificare il segnale, NON il rumoreSignalVoltageS.C.*AmplificationNoise inLead WiresDAQ BoardDigitizedSNRAmplify only at.01 VNone.001 Vx1001.1 V10Amplify at S.C.*and DAQ Boardx101.01 V1001.001 V1000The Signal to Noise Ratio (SNR) is a measure of how much noise exists in your signal compared to the signal itself. It is defined as the voltage level of your signal divided by the voltage level of the noise. The larger the Signal to Noise Ratio the better. As you can see above, the Signal to Noise Ratio is the best when only external amplification is used on your signal, and the worst when the signal is only amplified on the DAQ device.* S.C. = Signal Conditioning
32 Esempio : acquisizione di una termocoppia DAQ SignalAccessoryScheda DAQThe SCXI-1112 provides 8 thermocouple inputs, each with a 2Hz low-pass filter. Also, the SCXI-1112 has open thermocouple detection circuitry, which indicates the presence of an open thermocouple.
33 Un amplificatore in classe strumentale: NI-PGIA OtherSettling Time (LSB)NIGarantisce un tempo di assestamento bassissimo, anche a frequenze di campionamento elevateSampling Rate (kS/s)You can use the National Instruments programmable instrumentation amplifier, the NI-PGIA, on most E Series devices, to deliver full 12- and 16-bit accuracy, even when scanning multiple channels at high gains and fast rates. E Series devices can sample channels in any order at the maximum conversion rate. Furthermore, you can individually program each channel in the scan with a different gain, as bipolar or unipolar, and as differential or single-ended.Step-by-Step Data Acquisition ni.com
34 Altre tecniche: auto calibrazione OtherDrift Error (%)NIMisure migliori e più stabili nel tempoRiduzione dell’ effetto del drift in temperatura dei componentiTimeThe E Series analog inputs and outputs have calibration circuitry to correct gain and offset errors. You can calibrate the device in software to avoid errors caused by time and temperature drift at run time. No external circuitry is necessary; a highly-stable internal voltage reference ensures high accuracy and stability over time and temperature. Factory-calibration constants are permanently stored in an onboard EEPROM and cannot be modified. A modifiable section of the EEPROM stores user-modifiable constants. You can return the devices to their initial factory calibration by accessing the unmodified factory constants.
35 Circuito di protezione dal drift in temperatura OtherTemperature Error (%)Uso di reti di compensazione e componentistica di grado superioreAuto calibrazione basata su una sorgente a bordo precisaSensore di temperatura a bordoNITemperature (°C)The temperature in your computer or bench top instrument can and will fluctuate. Measurement Ready DAQ boards guarantee accurate measurements from 0 to 55 °C. Custom resistor networks and high-grade components help keep temperature drift to within 6 ppm/°C. In addition, the board can also perform a self-calibration with a single function call that will bring the temperature drift even lower to approximately 0.6 ppm/°C. A temperature sensor comes on all NI E series and NI S series boards to measure ambient temperature. You can access this temperature sensor programmatically with a simple function call to ensure that your device is operating within the specified range.Tutto ciò assicura un comportamento uniforme a standard elevati a prescindere dalla temperatura ambiente
36 Caratterizazione del convertitore analogico/digitale
37 Risoluzione di un convertitore AD 10020015050Time (ms)1.255.002.503.756.257.508.7510.00Amplitude(volts)16-Bit Versus 3-Bit Resolution(5kHz Sine Wave)16-bit3-bit000001010011101110111|One of the most important features of the measurement device is the resolution of its A/D converter. The resolution of an A/D converter describes the number of discrete voltage levels it can digitize over a specified range. National Instruments offers plug-in DAQ devices with either 12-bit or 16-bit resolution.To understand how resolution affects your measurement, consider the signal in the graph above. With a 3-bit A/D converter, the analog input circuit only has 2^3 (or 8) discrete levels to represent the incoming signal. Therefore, the signal must change 1.25V for the A/D converter to represent the incoming signal with a new number. The resulting waveform representation in computer memory looks like the stair-step waveform shown above.A 12-bit A/D converter offers 2^12 (4096) discrete levels over a specified input range. For a 0-10 V input range, this relates to 2.44 mV of resolution. In this configuration, a signal must change more than 2.44 mV for the DAQ device to detect a change.A 16-bit A/D converter offers 2^16 (65,536) discrete levels over a specified input range. For the same 0-10 V input range, this relates to ~150 uV of resolution.As a side note, you should realize that resolution does not mean accuracy. Resolution does affect accuracy, but it is not the only factor. Other factors include the linearity and offset characteristics of your amplifier, and system noise.La dinamica di conversione può essere migliorata giocando con il range ed il guadagno
38 Frequenza di campionamento E’ la frequenza di conversione dell’ A/D (Hertz)Va seguito il Teorema di NyquistFcampionamento>=2*FsegnaleBen campionatoAliasato per sottocampionamentoAs we revisit filtering, we will discuss another common problem solved by signal conditioning called aliasing. Assume you are acquiring a signal of unknown frequency. If you sample this signal too slowly, it will appear as a signal whose frequency is much lower than it actually is. This process of misinterpreting the frequency of a signal is commonly called aliasing. While it may seem harmless, these aliased signals can amplify or cancel out other frequency components of your signal, causing measurement errors. The problem is that there is no easy method of detecting an aliased signal once it has been acquired, or to reconstruct the original waveform with the appropriate frequency information.Common sources of aliased signals are noise and harmonic frequencies of your signal. Harmonic signals are signals that have frequency components at a scalar multiple of your signal’s fundamental frequency. For example, a 30 Hz signal may have additional frequency components at 60 Hz, 90 Hz, 120 Hz, etc. The amplitude of the harmonic signals is typically smaller than the fundamental frequency, and typically attenuate at higher harmonics. Realize that noise sources may also introduce harmonic signals into your system. A 50/60 Hz noise signal from a nearby power source will also inject noise signals at 100/120 Hz, 150/180 Hz, etc.
39 AliasingSottocampionare un segnale analogico può dar vita all’ apparire di “frequenze fittizie” nella banda di interesseUn segnale aliasato non può più essere correttamente ricostruitoAs we revisit filtering, we will discuss another common problem solved by signal conditioning called aliasing. Assume you are acquiring a signal of unknown frequency. If you sample this signal too slowly, it will appear as a signal whose frequency is much lower than it actually is. This process of misinterpreting the frequency of a a signal is commonly called aliasing. While it may seem harmless, these aliased signals can amplify or cancel out other frequency components of your signal, causing measurement errors. The problem is that there is no easy method of detecting an aliased signal once it has been acquired, or to reconstruct the original waveform with the appropriate frequency information.Common sources of aliased signals are noise and harmonic frequencies of your signal. Harmonic signals are signals that have frequency components at a scalar multiple of your signal’s fundamental frequency. For example, a 30 Hz signal may have additional frequency components at 60 Hz, 90 Hz, 120 Hz, etc. The amplitude of the harmonic signals are typically smaller than the fundamental frequency, and typically attenuate at higher harmonics. Realize that noise sources may also introduce harmonic signals into your system. A 50/60 Hz noise signal from a nearby power source will also inject noise signals at 100/120 Hz, 150/180 Hz, etc.
40 Prevenire l’ aliasing Incrementare la frequenza di campionamento Inserire un filtro passa-basso anti aliasYou have two weapons to attack and prevent aliasing. First, you can increase the sampling rate of your measurement system. The Nyquist Theorem states that you must sample your data at twice the rate of the highest frequency component of your signal to prevent aliasing. Many times this is impractical, as you may have no idea of all of the frequency components of your signal, especially those introduced by noise.The other method is to add lowpass filtering to your system. As mentioned before, lowpass filtering attenuates all unwanted signals, preventing them from affecting the signals you are trying to measure.A common practice is to implement both of these weapons. By setting your lowpass filter at a frequency just above the highest frequency you want to measure, you can eliminate noise signals and harmonics above that frequency. Then, you set your sampling rate just above two times this filter setting to obey the Nyquist Theorem and prevent your desired signals from being aliased.
41 Filtri Anti-Aliasing E’ un filtro analogico passa basso Taglia fuori le componenti a frequenze superiore che potenzialmente possono dare aliasYou have two weapons to attack and prevent aliasing. First, you can increase the sampling rate of your measurement system. The Nyquist Theorem states that you must sample your data at twice the rate of the highest frequency component of your signal to prevent aliasing. Many times this is impractical, as you may have no idea of all of the frequency components of your signal, especially those introduced by noise. The other method is to add low-pass filtering to your system. As mentioned before, low-pass filtering attenuates all unwanted signals, preventing them from affecting the signals you are trying to measure.A common practice is to implement both of these weapons. By setting your low-pass filter at a frequency just above the highest frequency you want to measure, you can eliminate noise signals and harmonics above that frequency. Then, you set your sampling rate just above two times this filter setting to obey the Nyquist Theorem and prevent your desired signals from being aliased.