Skip to content

AymenTurki0/Csharp__projet

Repository files navigation

Automatique - Transfer Function Analyzer Pro

Professional Transfer Function Analysis Tool

A sophisticated, visually appealing C# WPF application for analyzing discrete-time transfer functions G(z) = N(z)/D(z) with advanced animations and modular architecture.

Features

  • Modern UI Design: Dark theme with glassmorphism effects and smooth animations
  • Professional Analysis: Comprehensive transfer function analysis including:
    • Pole-zero analysis
    • Stability assessment
    • Frequency response
    • Step and impulse response
    • Performance metrics
  • Modular Code Generation: Automatically generates analysis results in 2.cs file
  • Interactive Visualizations: Real-time plots and charts
  • Export Capabilities: Save results in multiple formats
  • Drag & Drop Interface: Intuitive user experience

Project Structure

C:\Users\LENOVO\Desktop\RL_automatique\
├── MainWindow.xaml              # Main application UI
├── MainWindow.xaml.cs           # Main window logic
├── AnalysisWindow.xaml          # Results display window
├── AnalysisWindow.xaml.cs       # Analysis window logic
├── PlotWindow.cs                # Visualization window
├── App.xaml                     # Application definition
├── App.xaml.cs                  # Application logic
├── RL_automatique.csproj        # Project configuration
├── Core/
│   ├── TransferFunction.cs      # Transfer function model
│   └── TransferFunctionAnalyzer.cs # Analysis engine
├── 2.cs                         # Auto-generated modular analysis
└── README.md                    # This file

Setup Instructions

  1. Prerequisites:

    • .NET 8.0 SDK or later
    • Visual Studio 2022 or Visual Studio Code
    • Windows 10/11
  2. Installation:

    # Navigate to the project directory
    cd C:\Users\LENOVO\Desktop\RL_automatique
    
    # Restore NuGet packages
    dotnet restore
    
    # Build the project
    dotnet build
    
    # Run the application
    dotnet run
  3. Alternative with Visual Studio:

    • Open RL_automatique.csproj in Visual Studio
    • Press F5 to build and run

Usage Guide

  1. Launch Application: Start the application to see the modern UI

  2. Enter Transfer Function:

    • Input numerator coefficients (highest to lowest degree)
    • Input denominator coefficients (highest to lowest degree)
    • Example: For G(z) = (z + 0.5)/(z² - 0.8z + 0.2), enter:
      • Numerator: 1, 0.5
      • Denominator: 1, -0.8, 0.2
  3. Start Analysis: Click "🚀 START ANALYSIS" to begin processing

  4. View Results: Analysis window shows comprehensive results

  5. Modular Output: Check 2.cs file for generated code

Key Components

MainWindow

  • Professional dark UI with animations
  • Input validation and error handling
  • Save/Load functionality for transfer functions
  • Loading animations during processing

Core Engine

  • TransferFunction.cs: Mathematical model with polynomial evaluation
  • TransferFunctionAnalyzer.cs: Comprehensive analysis algorithms
  • Root finding, stability analysis, frequency response

Analysis Results

  • Pole-zero locations with stability assessment
  • Step response characteristics (overshoot, settling time)
  • Frequency response plots
  • Performance metrics and system classification

Modular Architecture

The application generates modular code in 2.cs containing:

  • Transfer function coefficients
  • Computed poles and zeros
  • Stability results
  • Performance metrics
  • Utility methods for analysis execution

Analysis Capabilities

  • Stability Analysis: Unit circle pole locations
  • Root Finding: Numerical methods for poles/zeros
  • Frequency Response: Magnitude and phase analysis
  • Time Domain: Step and impulse response simulation
  • Performance Metrics: Overshoot, settling time, steady-state values

Design Features

  • Dark Theme: Modern professional appearance
  • Glassmorphism Effects: Transparent elements with blur
  • Smooth Animations: Fade-in effects and hover animations
  • Responsive Layout: Adaptive to different screen sizes
  • Typography: Segoe UI for readability

Advanced Features

  • Real-time visualization updates
  • Export to multiple formats (TXT, CSV)
  • Interactive pole-zero plots
  • Comprehensive error handling
  • Professional reporting

Example Usage

// Example transfer function: G(z) = (z + 0.5)/(z² - 0.8z + 0.15)
// Numerator: 1, 0.5
// Denominator: 1, -0.8, 0.15
// Results in stable second-order system with specific performance characteristics

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages