Digital-analog algorithm